restore test level and dust2 from main branch

This commit is contained in:
2026-06-25 17:30:30 -04:00
parent a351cf2dc4
commit 11d079b38c
4 changed files with 731 additions and 129 deletions
+9 -22
View File
@@ -1,5 +1,5 @@
extends Node3D
## Runtime level builder - attaches to LevelRuntime node.
class_name LevelRuntime
var _speed_label: Label
var _state_label: Label
@@ -141,27 +141,13 @@ func _spawn_player(pid: int) -> CharacterBody3D:
if mover_script:
player.set_script(mover_script)
# Visual Model for Player
var is_local = (pid == multiplayer.get_unique_id())
if is_local:
# Local player: use skinned Miku model with animations
var skinned = load("res://characters/skinned_player_model.gd").new()
skinned.name = "SkinnedModel"
skinned.model_path = "res://assets/characters/skins/miku_proper_anim.glb"
skinned.scale_factor = 1.25
skinned.position_y_offset = -0.2
skinned.position = Vector3(0, 0.0, 0)
skinned.first_person_mode = true
player.add_child(skinned)
print("LevelRuntime: added SkinnedModel for local player")
else:
# Remote players: use procedural humanoid
var humanoid = load("res://characters/humanoid_model.gd").new()
humanoid.name = "HumanoidModel"
humanoid.color = Color(0.2, 0.4, 0.8)
humanoid.shadows_only = false
humanoid.position = Vector3(0, -0.9, 0)
player.add_child(humanoid)
# Humanoid Model for Player (Shadows only locally, visible to others)
var humanoid = load("res://characters/humanoid_model.gd").new()
humanoid.name = "HumanoidModel"
humanoid.color = Color(0.2, 0.4, 0.8) # Blueish for player
humanoid.shadows_only = (pid == multiplayer.get_unique_id())
humanoid.position = Vector3(0, -0.9, 0) # Offset from center to feet
player.add_child(humanoid)
# Movement State Machine
var sm := Node.new()
@@ -223,6 +209,7 @@ func _spawn_player(pid: int) -> CharacterBody3D:
head_pivot.params = player.params
# Authority configuration
var is_local = (pid == multiplayer.get_unique_id())
if is_local:
_player = player
player.set_physics_process(true)