Cleanup character move

This commit is contained in:
2025-11-18 16:29:38 +01:00
parent 18f9a4fec7
commit 67a4b7038a
8 changed files with 29 additions and 30 deletions

View File

@ -86,8 +86,8 @@ To move beyond pre-defined ship parts, the game will feature an in-game system f
The player's ship is not a monolithic entity but a collection of distinct, physically simulated components attached by joints. Key modules include:
- Spaceship: The main RigidBody2D hull that tracks overall mass, inertia, and health.
- Thruster: Self-contained RigidBody2D components that apply their own force. Their role (main engine, RCS, etc.) is an emergent property of their placement on the hull.
- Spaceship: The main RigidBody3D hull that tracks overall mass, inertia, and health.
- Thruster: Self-contained RigidBody3D components that apply their own force. Their role (main engine, RCS, etc.) is an emergent property of their placement on the hull.
- ThrusterController: The "brains" of the ship's movement, featuring a sophisticated autopilot that can execute fuel-optimal "bang-coast-bang" rotational maneuvers and a PD controller for stable attitude hold.
- FuelSystem & LifeSupport: Centralized managers for resources and internal ship environment. Hull breaches can create thrust vectors from escaping atmosphere.
- On-board Sensors: Diegetic components like Accelerometers allow the crew to calibrate ship performance by test-firing thrusters and measuring the true physical output.

View File

@ -1,9 +1,9 @@
[gd_scene load_steps=9 format=3 uid="uid://7yc6a07xoccy"]
[ext_resource type="Script" uid="uid://cdmmiixa75f3x" path="res://scenes/tests/3d/character_pawn_3d.gd" id="1_4frsu"]
[ext_resource type="PackedScene" uid="uid://bm1rbv4tuppbc" path="res://eva_suit_controller.tscn" id="3_gnddn"]
[ext_resource type="Script" uid="uid://y3vo40i16ek3" path="res://scenes/tests/3d/zero_g_movement_component.gd" id="4_8jhjh"]
[ext_resource type="PackedScene" uid="uid://ba3ijdstp2bvt" path="res://scenes/tests/3d/player_controller_3d.tscn" id="4_bcy3l"]
[ext_resource type="Script" uid="uid://cdmmiixa75f3x" path="res://scenes/character/character_pawn_3d.gd" id="1_4frsu"]
[ext_resource type="PackedScene" uid="uid://bm1rbv4tuppbc" path="res://scenes/character/eva_suit_controller.tscn" id="3_gnddn"]
[ext_resource type="Script" uid="uid://y3vo40i16ek3" path="res://scenes/character/zero_g_movement_component.gd" id="4_8jhjh"]
[ext_resource type="PackedScene" uid="uid://ba3ijdstp2bvt" path="res://scenes/character/player_controller_3d.tscn" id="4_bcy3l"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_6vm80"]
@ -23,46 +23,45 @@ properties/2/path = NodePath("CameraPivot:rotation")
properties/2/spawn = true
properties/2/replication_mode = 2
[node name="CharacterPawn3D" type="RigidBody3D"]
[node name="CharacterPawn3D" type="RigidBody3D" unique_id=288275840]
script = ExtResource("1_4frsu")
metadata/_custom_type_script = "uid://cdmmiixa75f3x"
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=1967015232]
shape = SubResource("CapsuleShape3D_6vm80")
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
[node name="MeshInstance3D" type="MeshInstance3D" parent="." unique_id=1703183586]
mesh = SubResource("CapsuleMesh_6vm80")
[node name="CameraAnchor" type="Marker3D" parent="."]
[node name="CameraAnchor" type="Marker3D" parent="." unique_id=462168232]
[node name="CameraPivot" type="Node3D" parent="."]
[node name="CameraPivot" type="Node3D" parent="." unique_id=794640520]
physics_interpolation_mode = 1
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.75, 0)
top_level = true
[node name="SpringArm" type="SpringArm3D" parent="CameraPivot"]
[node name="SpringArm" type="SpringArm3D" parent="CameraPivot" unique_id=1399441728]
spring_length = 3.0
[node name="Camera3D" type="Camera3D" parent="CameraPivot/SpringArm"]
current = true
[node name="Camera3D" type="Camera3D" parent="CameraPivot/SpringArm" unique_id=1779046272]
far = 200000.0
[node name="GripDetector" type="Area3D" parent="."]
[node name="GripDetector" type="Area3D" parent="." unique_id=734413990]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -1)
collision_layer = 0
collision_mask = 32768
monitorable = false
[node name="CollisionShape3D" type="CollisionShape3D" parent="GripDetector"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="GripDetector" unique_id=1939219836]
shape = SubResource("SphereShape3D_gnddn")
[node name="ZeroGMovementComponent" type="Node3D" parent="."]
[node name="ZeroGMovementComponent" type="Node3D" parent="." unique_id=594953523]
script = ExtResource("4_8jhjh")
metadata/_custom_type_script = "uid://y3vo40i16ek3"
[node name="EVAMovementComponent" parent="." instance=ExtResource("3_gnddn")]
[node name="EVAMovementComponent" parent="." unique_id=1806288315 instance=ExtResource("3_gnddn")]
[node name="MultiplayerSynchronizer" type="MultiplayerSynchronizer" parent="."]
[node name="MultiplayerSynchronizer" type="MultiplayerSynchronizer" parent="." unique_id=732324183]
replication_config = SubResource("SceneReplicationConfig_gnddn")
[node name="PlayerController3d" parent="." instance=ExtResource("4_bcy3l")]
[node name="PlayerController3d" parent="." unique_id=1450011826 instance=ExtResource("4_bcy3l")]

View File

@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://bm1rbv4tuppbc"]
[ext_resource type="Script" uid="uid://d4jka2etva22s" path="res://scenes/tests/3d/eva_movement_component.gd" id="1_mb22m"]
[ext_resource type="Script" uid="uid://d4jka2etva22s" path="res://scenes/character/eva_movement_component.gd" id="1_mb22m"]
[node name="EVASuitController" type="Node3D"]
script = ExtResource("1_mb22m")

View File

@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://ba3ijdstp2bvt"]
[ext_resource type="Script" uid="uid://vjfk3xnapfti" path="res://scenes/tests/3d/player_controller_3d.gd" id="1_elh6f"]
[ext_resource type="Script" uid="uid://vjfk3xnapfti" path="res://scenes/character/player_controller_3d.gd" id="1_elh6f"]
[node name="PlayerController3d" type="Node"]
script = ExtResource("1_elh6f")

View File

@ -1,6 +1,6 @@
[gd_scene load_steps=6 format=3 uid="uid://5noqmp8b267n"]
[ext_resource type="Script" uid="uid://cnt6griexrsaa" path="res://scenes/tests/3d/grips/grip_area_3d.gd" id="1_c81dj"]
[ext_resource type="Script" uid="uid://cnt6griexrsaa" path="res://scenes/ship/components/grips/grip_area_3d.gd" id="1_c81dj"]
[sub_resource type="CylinderMesh" id="CylinderMesh_c81dj"]
top_radius = 0.02

View File

@ -1,6 +1,6 @@
[gd_scene load_steps=7 format=3 uid="uid://ddfsn0rtdnfda"]
[ext_resource type="PackedScene" uid="uid://5noqmp8b267n" path="res://scenes/tests/3d/grips/single_handhold.tscn" id="1_jlvj7"]
[ext_resource type="PackedScene" uid="uid://5noqmp8b267n" path="res://scenes/ship/components/grips/single_handhold.tscn" id="1_jlvj7"]
[ext_resource type="PackedScene" uid="uid://dvpy3urgtm62n" path="res://scenes/ship/components/hardware/spawner.tscn" id="2_jlvj7"]
[sub_resource type="BoxMesh" id="BoxMesh_kateb"]

View File

@ -1,13 +1,13 @@
[gd_resource type="Resource" script_class="GameConfig" load_steps=5 format=3 uid="uid://cv15sck8rl2b7"]
[ext_resource type="PackedScene" uid="uid://chgycmkkaf7jv" path="res://scenes/characters/pilot_ball.tscn" id="1_s0mxw"]
[ext_resource type="PackedScene" uid="uid://7yc6a07xoccy" path="res://scenes/character/character_pawn_3d.tscn" id="1_sk8k5"]
[ext_resource type="PackedScene" uid="uid://bkwogkfqk2uxo" path="res://modules/3d_test_ship.tscn" id="2_75b4c"]
[ext_resource type="PackedScene" uid="uid://dnre6svquwdtb" path="res://scenes/characters/player_controller.tscn" id="2_sk8k5"]
[ext_resource type="Script" uid="uid://bfc6u1f8sigxj" path="res://scripts/singletons/game_config.gd" id="3_75b4c"]
[ext_resource type="PackedScene" uid="uid://ba3ijdstp2bvt" path="res://scenes/character/player_controller_3d.tscn" id="3_m00o7"]
[resource]
script = ExtResource("3_75b4c")
player_controller_scene = ExtResource("2_sk8k5")
default_pawn_scene = ExtResource("1_s0mxw")
player_controller_scene = ExtResource("3_m00o7")
default_pawn_scene = ExtResource("1_sk8k5")
default_ship_scene = ExtResource("2_75b4c")
metadata/_custom_type_script = "uid://bfc6u1f8sigxj"

View File

@ -14,8 +14,8 @@ var registered_spawners: Array[Spawner] = []
var waiting_players: Array[int] = [] # A queue for players waiting to spawn
# --- Scene References for 3D ---
var player_controller_3d_scene: PackedScene = preload("res://scenes/tests/3d/player_controller_3d.tscn")
var character_pawn_3d_scene: PackedScene = preload("res://scenes/tests/3d/character_pawn_3d.tscn")
var player_controller_3d_scene: PackedScene = preload("res://scenes/character/player_controller_3d.tscn")
var character_pawn_3d_scene: PackedScene = preload("res://scenes/character/character_pawn_3d.tscn")
func _ready():