WIP: Spawn bullets on the server and sync them

This commit is contained in:
2025-01-26 20:20:15 +01:00
parent c2a5f9cf1c
commit 24914cb6fa
8 changed files with 17 additions and 7 deletions

View File

@ -22,6 +22,11 @@ func _process(delta):
#ray.collision_mask = 1
#ray.enabled = 1
if ray.is_colliding():
var collider = ray.get_collider()
if collider != null and collider.is_in_group("target"):
ray.get_collider().take_damage()
if collider != null and collider.is_in_group("body"):
ray.get_collider().hit()
print("I got hit")
rigid_body_3d.visible = false
particles.emitting = true