add projectile destruction and elevation
This commit is contained in:
@@ -18,7 +18,6 @@ func _ready() -> void:
|
||||
_life_timer = _lifetime
|
||||
_debug_collision_shapes.init(get_children(), self, _collision_debug_material)
|
||||
global_position = _start_position
|
||||
global_position.y = HEIGHT
|
||||
body_entered.connect(_on_body_entered)
|
||||
|
||||
|
||||
@@ -42,7 +41,19 @@ func set_velocity(velocity: Vector3) -> void:
|
||||
|
||||
|
||||
func _on_body_entered(node: Node3D) -> void:
|
||||
if node is not Player:
|
||||
if node is Player:
|
||||
queue_free()
|
||||
return
|
||||
|
||||
queue_free()
|
||||
print(node)
|
||||
if node is CollisionObject3D:
|
||||
var collision_node := node as CollisionObject3D
|
||||
if collision_node.collision_layer & 1:
|
||||
queue_free()
|
||||
return
|
||||
|
||||
if node is CSGCombiner3D:
|
||||
var collision_node := node as CSGCombiner3D
|
||||
if collision_node.collision_layer & 1:
|
||||
queue_free()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user