WIP: Spawn bullets on the server and sync them
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user