Improve nearby water recovery and camera prompts
Recover players on generated worlds to the nearest safe grass or sand surface. Use the active gameplay camera when positioning shop and storage prompts.
This commit is contained in:
parent
ae802493a0
commit
4575830857
10 changed files with 396 additions and 25 deletions
|
|
@ -1892,7 +1892,7 @@ func _position_storage_prompt(world_anchor: Vector3) -> void:
|
|||
if _player == null:
|
||||
_storage_prompt.hide()
|
||||
return
|
||||
var camera := _player.get_gameplay_camera()
|
||||
var camera := _player.get_active_gameplay_camera()
|
||||
if camera == null or camera.is_position_behind(world_anchor):
|
||||
_storage_prompt.hide()
|
||||
return
|
||||
|
|
@ -2006,7 +2006,7 @@ func _position_shop_prompt(world_anchor: Vector3) -> void:
|
|||
if _player == null:
|
||||
_shop_prompt.hide()
|
||||
return
|
||||
var camera: Camera3D = _player.get_gameplay_camera()
|
||||
var camera: Camera3D = _player.get_active_gameplay_camera()
|
||||
if camera == null or camera.is_position_behind(world_anchor):
|
||||
_shop_prompt.hide()
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue