rocket launcher moves objects, blast radius not falling off properly yet
This commit is contained in:
@@ -1,10 +1,17 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://hptaoyu5jeqk"]
|
||||
[gd_scene load_steps=12 format=3 uid="uid://hptaoyu5jeqk"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://v6217lr32l0m" path="res://assets/Models/rocket1.png" id="1_f6yyc"]
|
||||
[ext_resource type="Script" path="res://scripts/rocket.gd" id="1_s0phn"]
|
||||
[ext_resource type="Texture2D" uid="uid://cfanvwkgixns0" path="res://assets/Models/rocket.rough.png" id="2_g6kha"]
|
||||
[ext_resource type="PackedScene" uid="uid://6p7d7txcox7i" path="res://assets/rocket_explosion.tscn" id="2_mbh48"]
|
||||
|
||||
[sub_resource type="Curve" id="Curve_lnjp5"]
|
||||
_data = [Vector2(0, 0), 0.0, 1.4, 0, 0, Vector2(1, 1), 0.0, 0.0, 0, 0]
|
||||
point_count = 2
|
||||
|
||||
[sub_resource type="CurveTexture" id="CurveTexture_0mibw"]
|
||||
curve = SubResource("Curve_lnjp5")
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_2051l"]
|
||||
resource_name = "rocketlauncher1.rocket"
|
||||
cull_mode = 2
|
||||
@@ -54,7 +61,10 @@ shadow_mesh = SubResource("ArrayMesh_xh68t")
|
||||
radius = 0.154605
|
||||
height = 1.21279
|
||||
|
||||
[node name="Rocket" type="RigidBody3D"]
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_vdo7n"]
|
||||
radius = 10.0
|
||||
|
||||
[node name="Rocket" type="RigidBody3D" node_paths=PackedStringArray("blast_radius")]
|
||||
collision_layer = 6
|
||||
collision_mask = 7
|
||||
continuous_cd = true
|
||||
@@ -62,14 +72,23 @@ max_contacts_reported = 100
|
||||
contact_monitor = true
|
||||
script = ExtResource("1_s0phn")
|
||||
explosion = ExtResource("2_mbh48")
|
||||
blast_radius = NodePath("BlastRadius")
|
||||
blast_radius_falloff = SubResource("CurveTexture_0mibw")
|
||||
|
||||
[node name="Rocket" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(-1.48467e-14, -4.37114e-08, -1, -1, 3.13916e-07, 1.12501e-15, 3.13916e-07, 1, -4.37114e-08, -0.103685, 0, -0.116837)
|
||||
transform = Transform3D(-1.48467e-14, -4.37114e-08, -1, -1, 3.13916e-07, 1.12501e-15, 3.13916e-07, 1, -4.37114e-08, 0, 0, -0.117)
|
||||
mesh = SubResource("ArrayMesh_atqsb")
|
||||
skeleton = NodePath("")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1.91069e-15, 4.37114e-08, -1, 1, -4.37114e-08, 0, -4.37114e-08, -1, -4.37114e-08, -0.131657, 0, 0.116837)
|
||||
transform = Transform3D(1.91069e-15, 4.37114e-08, -1, 1, -4.37114e-08, 0, -4.37114e-08, -1, -4.37114e-08, 0, 0, 0.117)
|
||||
shape = SubResource("CapsuleShape3D_8v4gm")
|
||||
|
||||
[node name="BlastRadius" type="Area3D" parent="."]
|
||||
collision_layer = 0
|
||||
collision_mask = 7
|
||||
|
||||
[node name="radiusShape" type="CollisionShape3D" parent="BlastRadius"]
|
||||
shape = SubResource("SphereShape3D_vdo7n")
|
||||
|
||||
[connection signal="body_shape_entered" from="." to="." method="_on_body_shape_entered"]
|
||||
|
||||
Reference in New Issue
Block a user