diff options
author | Malfurious <m@lfurio.us> | 2022-07-22 05:12:58 -0400 |
---|---|---|
committer | Malfurious <m@lfurio.us> | 2022-07-22 05:12:58 -0400 |
commit | ea3ecd73dab3e0e06bb145b38e8258b9dd02abcb (patch) | |
tree | 42a67300e8e2ebcbd9868e6af1f7e992b285c3c6 /assets/weapons/goo_gun/Bullet.tscn | |
parent | f1923b54231daac260950baecd0377f49b2ab641 (diff) | |
download | project-s-ea3ecd73dab3e0e06bb145b38e8258b9dd02abcb.tar.gz project-s-ea3ecd73dab3e0e06bb145b38e8258b9dd02abcb.zip |
Despawn bullets on collision with another physics body
Signed-off-by: Malfurious <m@lfurio.us>
Diffstat (limited to 'assets/weapons/goo_gun/Bullet.tscn')
-rw-r--r-- | assets/weapons/goo_gun/Bullet.tscn | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/assets/weapons/goo_gun/Bullet.tscn b/assets/weapons/goo_gun/Bullet.tscn index 4a1700c..69ba3b6 100644 --- a/assets/weapons/goo_gun/Bullet.tscn +++ b/assets/weapons/goo_gun/Bullet.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=4 format=2] +[gd_scene load_steps=5 format=2] [ext_resource path="res://assets/characters/base_character/friendly_material.tres" type="Material" id=1] +[ext_resource path="res://assets/weapons/goo_gun/Bullet.gd" type="Script" id=2] [sub_resource type="SphereMesh" id=1] material = ExtResource( 1 ) @@ -10,7 +11,10 @@ material = ExtResource( 1 ) [node name="Bullet" type="RigidBody"] transform = Transform( 0.3, 0, 0, 0, 0.3, 0, 0, 0, 0.3, 0, 0, 0 ) gravity_scale = 5.0 +contacts_reported = 1 +contact_monitor = true linear_damp = 2.0 +script = ExtResource( 2 ) [node name="MeshInstance" type="MeshInstance" parent="."] mesh = SubResource( 1 ) @@ -18,3 +22,5 @@ material/0 = null [node name="CollisionShape" type="CollisionShape" parent="."] shape = SubResource( 2 ) + +[connection signal="body_entered" from="." to="." method="_on_Bullet_body_entered"] |