summaryrefslogtreecommitdiff
path: root/scenes/machines
diff options
context:
space:
mode:
Diffstat (limited to 'scenes/machines')
-rw-r--r--scenes/machines/Cannon.tscn78
1 files changed, 78 insertions, 0 deletions
diff --git a/scenes/machines/Cannon.tscn b/scenes/machines/Cannon.tscn
new file mode 100644
index 0000000..8126887
--- /dev/null
+++ b/scenes/machines/Cannon.tscn
@@ -0,0 +1,78 @@
+[gd_scene load_steps=11 format=2]
+
+[ext_resource path="res://scripts/machines/Cannon.gd" type="Script" id=1]
+[ext_resource path="res://sounds/explode.wav" type="AudioStream" id=2]
+
+[sub_resource type="PhysicsMaterial" id=8]
+rough = true
+
+[sub_resource type="BoxShape" id=1]
+extents = Vector3( 1, 0.5, 0.5 )
+
+[sub_resource type="SpatialMaterial" id=2]
+albedo_color = Color( 0.333333, 0.25098, 0.0392157, 1 )
+
+[sub_resource type="CubeMesh" id=3]
+size = Vector3( 1.5, 0.25, 1 )
+
+[sub_resource type="CubeMesh" id=4]
+size = Vector3( 1.75, 0.3, 0.3 )
+
+[sub_resource type="SpatialMaterial" id=5]
+albedo_color = Color( 0, 0, 0, 1 )
+metallic = 1.0
+metallic_specular = 0.0
+roughness = 0.53
+
+[sub_resource type="BoxShape" id=6]
+extents = Vector3( 0.2, 0.2, 0.2 )
+
+[sub_resource type="CubeMesh" id=7]
+size = Vector3( 0.4, 0.4, 0.4 )
+
+[node name="Cannon" type="RigidBody"]
+mass = 3180.0
+physics_material_override = SubResource( 8 )
+script = ExtResource( 1 )
+
+[node name="CollisionShape" type="CollisionShape" parent="."]
+transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0 )
+shape = SubResource( 1 )
+
+[node name="MeshInstance" type="MeshInstance" parent="."]
+transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.25, 0.125, 0 )
+material_override = SubResource( 2 )
+mesh = SubResource( 3 )
+
+[node name="YawJoint" type="Spatial" parent="."]
+transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.368354, 0.499951, 0 )
+
+[node name="PitchJoint" type="Spatial" parent="YawJoint"]
+
+[node name="MeshInstance" type="MeshInstance" parent="YawJoint/PitchJoint"]
+transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.355227, 0, 0 )
+mesh = SubResource( 4 )
+skeleton = NodePath("../..")
+material/0 = SubResource( 5 )
+
+[node name="Muzzle" type="Spatial" parent="YawJoint/PitchJoint"]
+transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1.13452, 0, 0 )
+
+[node name="explosion_sound" type="AudioStreamPlayer3D" parent="YawJoint/PitchJoint/Muzzle"]
+stream = ExtResource( 2 )
+unit_db = 9.0
+
+[node name="Camera" type="Camera" parent="YawJoint/PitchJoint"]
+transform = Transform( -4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -0.513577, 0.363402, 0 )
+fov = 44.6
+far = 8192.0
+
+[node name="SteerArea" type="Area" parent="."]
+transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.935472, 0.123637, 0 )
+monitoring = false
+
+[node name="CollisionShape" type="CollisionShape" parent="SteerArea"]
+shape = SubResource( 6 )
+
+[node name="MeshInstance" type="MeshInstance" parent="SteerArea"]
+mesh = SubResource( 7 )