only mark interactive for yourself

This commit is contained in:
veclavtalica 2025-02-12 07:34:41 +03:00
parent 4bde2b3a16
commit 03421264fd

View File

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