Files
CosmicClash/Game/objects/ship.tscn
T
Josh Creek 1eb5a3188d feat: replace ship and ball placeholder meshes with Blender-modeled assets
Ship gets a greebled hull, tapered nose, swept canopy, twin engine nacelles,
and tail fin (built via the vendored Blender MCP, generator committed at
tools/blender/gen_ship.py) in place of the 5 flat primitives. The ball is
fully remodeled as a smooth round sphere with a crossed emissive accent
pattern (gen_ball.py), replacing the old flat-shaded gold_ball rather than
just tweaking its material.

Node names (Nose/TailFin) are preserved for Ship._apply_team_color(), and
the RigidBody3D/CollisionShape3D physics on both ship.tscn and ball.tscn are
untouched so RL-trained bots and flight feel stay valid. Each part's mesh is
extracted to a standalone .res (tools/blender/extract_meshes.gd) rather than
referenced via glb::ArrayMesh_xxx sub-paths, which don't reliably resolve
across scene files and were silently rendering both models invisible.
2026-08-03 22:39:46 +01:00

50 lines
2.0 KiB
Plaintext

[gd_scene load_steps=13 format=3 uid="uid://p07epxnh8wwp"]
[ext_resource type="Script" uid="uid://dyq1n7q1bqjps" path="res://scripts/ship.gd" id="1_efag7"]
[ext_resource type="ArrayMesh" path="res://assets/models/ship_hull.res" id="2_hull"]
[ext_resource type="ArrayMesh" path="res://assets/models/ship_nose.res" id="3_nose"]
[ext_resource type="ArrayMesh" path="res://assets/models/ship_canopy.res" id="4_canopy"]
[ext_resource type="ArrayMesh" path="res://assets/models/ship_tailfin.res" id="5_talfin"]
[ext_resource type="ArrayMesh" path="res://assets/models/ship_engine_l.res" id="6_enginel"]
[ext_resource type="ArrayMesh" path="res://assets/models/ship_engine_r.res" id="7_enginer"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_ship"]
friction = 0.1
bounce = 0.15
[sub_resource type="BoxShape3D" id="BoxShape3D_dsjou"]
size = Vector3(1, 1, 4)
[node name="Ship" type="RigidBody3D"]
mass = 5.0
physics_material_override = SubResource("PhysicsMaterial_ship")
inertia = Vector3(1, 1, 1)
script = ExtResource("1_efag7")
[node name="Hull" type="MeshInstance3D" parent="."]
transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0)
mesh = ExtResource("2_hull")
[node name="Nose" type="MeshInstance3D" parent="."]
transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0)
mesh = ExtResource("3_nose")
[node name="Canopy" type="MeshInstance3D" parent="."]
transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0.31, -0.55)
mesh = ExtResource("4_canopy")
[node name="TailFin" type="MeshInstance3D" parent="."]
transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0.24, 0.72)
mesh = ExtResource("5_talfin")
[node name="EngineGlowL" type="MeshInstance3D" parent="."]
transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, -1, -0.42, -0.05, 0.95)
mesh = ExtResource("6_enginel")
[node name="EngineGlowR" type="MeshInstance3D" parent="."]
transform = Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, -1, 0.42, -0.05, 0.95)
mesh = ExtResource("7_enginer")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("BoxShape3D_dsjou")