forked from team-sg/hero-mark-2
make arrows collide with dynamic objects (closes #61)
This commit is contained in:
parent
83a06510e5
commit
0c9528c7c1
4 changed files with 4 additions and 3 deletions
|
@ -30,7 +30,7 @@ func _physics_process(delta):
|
|||
#Wall Collision
|
||||
func _on_Hitbox_body_entered(body):
|
||||
if breaks_on_wall:
|
||||
if body is TileMap or body is StaticBody2D:
|
||||
if body is TileMap or body is StaticBody2D or body.is_in_group("stop_arrow"):
|
||||
_make_sparks()
|
||||
_persist_trail()
|
||||
queue_free()
|
||||
|
|
|
@ -46,6 +46,7 @@ scale_amount_random = 0.25
|
|||
scale_amount_curve = SubResource( 3 )
|
||||
|
||||
[node name="Hitbox" type="Area2D" parent="." groups=["arrow"]]
|
||||
collision_mask = 5
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
|
||||
position = Vector2( -0.5, -0.5 )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue