Add more ship visuals and adjust player script

This commit is contained in:
Gary Steven Keough 2024-12-10 12:28:18 -05:00
parent 9e344da33f
commit 65630fe171
4 changed files with 24 additions and 2 deletions

View File

@ -64,6 +64,7 @@ func _physics_process(delta: float) -> void:
if current_ship != null: if current_ship != null:
global_transform.basis = current_ship.global_transform.basis global_transform.basis = current_ship.global_transform.basis
if Input.mouse_mode == Input.MOUSE_MODE_CAPTURED: if Input.mouse_mode == Input.MOUSE_MODE_CAPTURED:
_handle_joypad_camera_rotation(delta) _handle_joypad_camera_rotation(delta)
velocity = _walk(delta) + _gravity(delta) + _jump(delta) velocity = _walk(delta) + _gravity(delta) + _jump(delta)

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=6 format=3 uid="uid://c7mtmmke1anxp"] [gd_scene load_steps=7 format=3 uid="uid://c7mtmmke1anxp"]
[ext_resource type="Script" path="res://assets/core/ships/test_ship.gd" id="1_yql7r"] [ext_resource type="Script" path="res://assets/core/ships/test_ship.gd" id="1_yql7r"]
@ -15,6 +15,11 @@ height = 7.405
[sub_resource type="BoxShape3D" id="BoxShape3D_7jr0u"] [sub_resource type="BoxShape3D" id="BoxShape3D_7jr0u"]
size = Vector3(5.14063, 6.07324, 10.1924) size = Vector3(5.14063, 6.07324, 10.1924)
[sub_resource type="CylinderMesh" id="CylinderMesh_h3cm2"]
top_radius = 0.1
bottom_radius = 0.1
height = 4.5
[node name="TestShip" type="RigidBody3D" node_paths=PackedStringArray("ship_area")] [node name="TestShip" type="RigidBody3D" node_paths=PackedStringArray("ship_area")]
gravity_scale = 0.0 gravity_scale = 0.0
script = ExtResource("1_yql7r") script = ExtResource("1_yql7r")
@ -26,7 +31,7 @@ mesh = SubResource("BoxMesh_tkeg5")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."] [node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("BoxShape3D_fs34p") shape = SubResource("BoxShape3D_fs34p")
[node name="MeshInstance3D2" type="MeshInstance3D" parent="."] [node name="Balloon" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 5.12542, 0) transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 5.12542, 0)
mesh = SubResource("CapsuleMesh_oqio3") mesh = SubResource("CapsuleMesh_oqio3")
skeleton = NodePath("") skeleton = NodePath("")
@ -37,5 +42,21 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.99997, 0)
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D"] [node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D"]
shape = SubResource("BoxShape3D_7jr0u") shape = SubResource("BoxShape3D_7jr0u")
[node name="MeshInstance3D2" type="MeshInstance3D" parent="."]
transform = Transform3D(0.866025, -0.5, 0, 0.5, 0.866025, 0, 0, 0, 1, 1.25913, 1.87582, 2.33493)
mesh = SubResource("CylinderMesh_h3cm2")
[node name="MeshInstance3D3" type="MeshInstance3D" parent="."]
transform = Transform3D(0.866025, 0.5, 0, -0.5, 0.866025, 0, 0, 0, 1, -1.2691, 1.87582, 2.33493)
mesh = SubResource("CylinderMesh_h3cm2")
[node name="MeshInstance3D4" type="MeshInstance3D" parent="."]
transform = Transform3D(0.866025, -0.5, 0, 0.5, 0.866025, 0, 0, 0, 1, 1.25913, 1.87582, -2.52429)
mesh = SubResource("CylinderMesh_h3cm2")
[node name="MeshInstance3D5" type="MeshInstance3D" parent="."]
transform = Transform3D(0.866025, 0.5, 0, -0.5, 0.866025, 0, 0, 0, 1, -1.2691, 1.87582, -2.52429)
mesh = SubResource("CylinderMesh_h3cm2")
[connection signal="body_entered" from="Area3D" to="." method="_on_area_3d_body_entered"] [connection signal="body_entered" from="Area3D" to="." method="_on_area_3d_body_entered"]
[connection signal="body_exited" from="Area3D" to="." method="_on_area_3d_body_exited"] [connection signal="body_exited" from="Area3D" to="." method="_on_area_3d_body_exited"]

Binary file not shown.