Compare commits

...

2 Commits

Author SHA1 Message Date
veclavtalica
03421264fd only mark interactive for yourself 2025-02-12 07:34:41 +03:00
veclavtalica
4bde2b3a16 remove droplets out of interactive selection 2025-02-12 07:26:58 +03:00
2 changed files with 11 additions and 11 deletions

View File

@ -55,16 +55,16 @@ func _process(_delta: float) -> void:
func _physics_process(delta: float) -> void:
## Process interactivity selection.
var collider: Object = null
if _line_of_sight.is_colliding():
collider = _line_of_sight.get_collider(0)
if collider != _interaction_selection:
if _interaction_selection != null:
_interaction_selection.get_parent().mark_non_interactive()
if collider != null:
collider.get_parent().mark_interactive()
_interaction_selection = collider
if id == multiplayer.get_unique_id():
var collider: Object = null
if _line_of_sight.is_colliding():
collider = _line_of_sight.get_collider(0)
if collider != _interaction_selection:
if _interaction_selection != null:
_interaction_selection.get_parent().mark_non_interactive()
if collider != null:
collider.get_parent().mark_interactive()
_interaction_selection = collider
# Add the gravity.
if not is_on_floor():

View File

@ -52,7 +52,7 @@ func _on_body_entered(p_body: Node3D) -> void:
_model.hide()
_picking_area.collision_layer = 0
_disable_body.rpc()
_picking_area.collision_layer = 0
await _splash_small_sound.finished
if _splash_small_quiet_sound.playing:
await _splash_small_quiet_sound.finished