Commit Graph
43 Commits
Author SHA1 Message Date
Hermes 73831cb418 fix: force bone pose update for GLTF runtime skin deformation
GLTF runtime loaded models may not trigger automatic MeshInstance
vertex deformation when the AnimationPlayer updates bone poses.
Added throttled _update_skin() that re-applies current bone poses
to trigger NOTIFICATION_UPDATE_SKELETON, ensuring the renderer
sees the updated vertex positions.
2026-06-25 00:26:34 -04:00
Hermes fead2cc055 fix: resolve GDScript warnings for unused vars and shadowed names
- Prefix unused variables with underscore (chest, left_hand, right_hand, l_foot, r_foot)
- Rename 'name' parameter to 'bone_name'/'anim_name' to avoid shadowing Node.name
2026-06-25 00:04:59 -04:00
Hermes 50de6df450 fix: use animated GLB with all locomotion animations and fix scaling
The skinned player model was loading miku_rigged_final.glb which only
contained a single "Idle" animation (1 track, near-rest pose). This caused
"animation 'Jump/Walk/Run' not found" spam and a T-pose appearance.

Switch to miku_rigged_animated.glb which has all 7 animations
(Crouch, Death, Idle, Idle2, Jump, Run, Walk).

Additional fixes:
- Fix scaling: the GLB is already in meters (~1.6m tall), not cm.
  Removed the unconditional 0.01 cm->m conversion that was shrinking
  the character to 1/100th size.
- Fix bone track paths: use "MikuRig/Skeleton3D:" prefix matching the
  actual scene tree structure (AnimationPlayer is sibling of MikuRig).
- Add _ensure_locomotion_animations() to create Walk/Run/Jump/Idle
  procedurally if the GLB is missing them.
- Eliminate per-frame "not found" log spam with rate-limited warnings.
- Update level_runtime.gd and test_level_builder.gd to use animated GLB.

Closes #3d-player-model animation pipeline
2026-06-24 23:58:28 -04:00
Hermes 1653d404e2 fix: use correct Godot skeleton bone animation path format
The track path must be 'MikuRig/Skeleton3D:BoneName' (no :property suffix)
and the track type must be TYPE_VALUE with Vector3 position values.
Using :rotation suffix caused the track to not resolve.

Verified: Spine pose origin changes from (0,0,0) to (0,0.1,0) during animation.
2026-06-23 19:36:15 -04:00
Hermes 39063bfe9e fix: create proper Idle animation in Godot when GLB export loses tracks
The Blender GLTF exporter was stripping animation tracks (only 1 of 51
channels survived export). Now SkinnedPlayerModel detects this at
runtime and creates a proper Idle animation programmatically using Godot's
Animation API with 5 bone tracks (Spine, Arms, Neck, Hips).

Also switched model_path back to miku_rigged_final.glb since the
re-export wasn't adding usable animations.
2026-06-23 18:55:12 -04:00
Hermes e2a4e3997e fix: use a.loop_mode instead of a.mode for Godot 4.x Animation 2026-06-23 12:36:53 -04:00
Hermes 0da573f11f fix: use _find_skeleton and _find_animation_player consistently 2026-06-23 12:12:10 -04:00
Hermes 89ddac072b fix: resolve parse errors in skinned_player_model and level_runtime
- Remove duplicate is_local variable in level_runtime.gd line 224
- Remove orphaned animation code from old load_model in skinned_player_model.gd
- Both files now compile cleanly
2026-06-23 11:02:22 -04:00
Hermes 5e12502a18 fix: use GLTFDocument to load GLB at runtime (no .import needed)
Godot headless/CLI can't import GLB files — the GLTF loader only works
in the editor GUI. Switched SkinnedPlayerModel to use GLTFDocument.append_from_buffer()
which parses GLB data from raw bytes at runtime.

Verified: GLB parses successfully, generates scene with MikuRig skeleton,
AnimationPlayer, and 7 animations (Crouch, Death, Idle, Idle_001, Jump, Run, Walk).

Also added characters/glb_loader.gd as a reusable utility for loading
any GLB file at runtime.
2026-06-23 01:15:37 -04:00
Hermes 0672bebe7b feat: add rigged+animated Miku player model with auto-rig pipeline
- Add miku_rigged_animated.glb (3.27MB) with 18-bone skeleton and 6 animations
  (Idle, Walk, Run, Jump, Crouch, Death) via Blender auto-rig script
- Add tools/rig_and_animate.py: reusable Blender script for rigging any humanoid
  mesh with Mixamo-compatible bone naming
- Update SkinnedPlayerModel: scale_factor, first-person mode, animation state
  matching (Idle/Walk/Run/Jump/Crouch/Death)
- Update level_runtime.gd: use skinned model for local player, procedural
  humanoid for remote players
- Update skin_manager.gd and test_level_builder.gd to use animated model
- Fix Godot 4.2.1 'is not Type' syntax in 5 weapon files
- Add editor/import_miku_to_tscn.gd for editor-based GLB import
2026-06-23 00:19:52 -04:00
Hermes f7cd3571fd fix: replace f-strings with GDScript % formatting 2026-06-22 22:20:36 -04:00
Hermes a2956635c0 fix: third-person camera orbits player facing + robust animation handling
Third-person camera:
- Camera offset now follows player's forward direction using basis.z
- Smoothly orbits behind player when they turn
- Looks at player's head area (y+1.5)

SkinnedPlayerModel:
- Creates AnimationPlayer programmatically if GLB doesn't have one
- Copies animations from armature's animation_data to the player
- Handles both direct actions and NLA tracks
- More detailed debug output for scene tree and animation state
2026-06-22 22:02:30 -04:00
Hermes c033247f75 fix: rename param to 'on' to avoid shadowing Node3D.show()/is_visible() 2026-06-22 21:56:21 -04:00
Hermes 3e849551bd fix: rename 'name' param to 'anim_name' to avoid shadowing Node.name 2026-06-22 21:42:38 -04:00
Hermes cd1722ce74 fix: rename 'is_visible' param to 'show' to avoid shadowing Node3D.is_visible() 2026-06-22 21:06:35 -04:00
Hermes ade3d54d20 fix: rename shadowed 'visible' param, prefix unused 'impulse' with underscore 2026-06-22 20:34:02 -04:00
Hermes a1f48d9ef0 fix: string repeat() instead of * operator in GDScript 2026-06-22 20:27:26 -04:00
Hermes b1aec93fd5 fix: animation debug + F1 third-person camera
SkinnedPlayerModel:
- Added _print_tree debug to see GLB scene structure at runtime
- Auto-play Idle animation on load
- Added periodic debug output for animation state
- Only change animation when target differs from current

Third-person camera:
- F1 toggles between FPS and third-person view
- Third-person camera positioned behind/above player
- Smooth follow with lerp
- Camera tracks player position each frame
2026-06-22 19:55:54 -04:00
Hermes e1d2d140cb fix: calculate speed from player velocity instead of non-existent property 2026-06-22 19:10:53 -04:00
Hermes 92713a681a fix(miku): correct scale + animation playback
- Fixed Blender export: remove FBX armature modifier before scaling,
  then transform_apply(scale=True) before creating new armature
- Model now exports at correct 1.8 unit height (verified in Blender)
- SkinnedPlayerModel now polls MovementStateMachine in _process
  to drive animations based on movement state
- Player 1 gets Miku at origin, others get procedural humanoid at y=-0.9
2026-06-22 18:15:03 -04:00
Hermes ae8231d31d feat(miku): proper rigged model from Sketchfab + Blender
Pipeline:
1. Downloaded TDA-style Miku model from Sketchfab (19MB FBX, 38K verts)
2. Imported to Blender, scaled to Godot humanoid proportions (1.8u tall)
3. Created clean 17-bone humanoid armature (Hips/Spine/Chest/Head/Arms/Legs)
4. Auto-weight-painted mesh to armature
5. Added Idle (breath bounce) and Run (cycle) animations
6. Exported as GLB with embedded animations (3MB)

New:
- SkinnedPlayerModel class: loads GLB with own armature+animations
- Player 1 spawns with Miku model, others get procedural humanoid
- Completely separate from procedural model system

Files:
- assets/characters/skins/miku_rigged_final.glb (3MB, 48K verts, 17 bones, 2 anims)
- characters/skinned_player_model.gd
- Removed old procedural GLB attempts
2026-06-22 17:12:24 -04:00
Hermes b0fdc508f1 feat(miku): add rigged Miku character model with armature
- Generated rigged Miku model in Blender (79 mesh parts, 17 bones)
- Bone names match Godot Humanoid skeleton (Hips, Spine, Chest, Head, etc.)
- Includes idle animation (breath bounce)
- Fixed GLB export for Blender 5.0 API compatibility
- Updated HumanoidModel.apply_skin() with orientation fix
- Player 1 spawns with Miku rigged model, others get default blue
- Preview renders in docs/characters/skins/

Pipeline established:
- Blender headless -> Python script -> GLB export -> Godot import
- Skin system: PlayerSkin resource + SkinManager
- apply_skin() handles both GLB model and procedural color tint
2026-06-22 16:51:22 -04:00
Hermes a55eaff279 feat(skin): add skin system + Miku character skin
Skin System:
- PlayerSkin resource class (model_path, color_tint, etc.)
- SkinManager with default skins: Default, Red Team, Forest, Miku
- HumanoidModel.apply_skin() supports both GLB model replacement
  and procedural color tinting
- Procedural meshes auto-hide when GLB model is loaded

Miku Skin:
- 43-part procedural model generated in Blender (headless)
- Twin tails, headphones, thigh-high socks, idol outfit
- Teal/cyan color scheme with red accents
- Exported to assets/characters/skins/miku.glb
- Applied to player 1 in test level builder

Pipeline:
- Blender 5.0.1 + MCP addon installed
- Bridge script for socket-based Blender control
- docs/3D_ASSET_PIPELINE.md documents full workflow
2026-06-22 13:53:17 -04:00
DottsGit da4a6442c7 feat: implement player movement controller with grounded state, stair stepping, and wall interaction mechanics 2026-06-10 22:11:00 -04:00
DottsGit f63187e493 feat: implement foundational weapon systems, including hitscan and projectile base classes, reload mechanics, and player movement/camera integration. 2026-06-09 22:33:40 -04:00
DottsGit 4bb867a6f2 feat: implement plasma gun and rocket swarm mechanics along with various 3D asset imports 2026-06-07 18:23:47 -04:00
DottsGit 07a15fe998 fix: a lot of network sync fixes 2026-06-06 20:45:10 -04:00
DottsGit ff3e01a9e5 feat: implement procedural humanoid animations, modular weapon system, and dummy entity base classes 2026-06-06 19:10:29 -04:00
DottsGit acfb8bca16 feat: implement network manager, pause menu, and export configuration for project deployment 2026-06-06 14:33:43 -04:00
DottsGit 3488b8e005 fix: 3rd person and first person views 2026-06-06 11:51:28 -04:00
DottsGit 909b25548c fix: fov now linearly increases with speed and first person weapon view no longer clips through walls 2026-06-06 11:16:50 -04:00
DottsGit 10416a83a0 fix: awp fov 2026-06-06 11:05:46 -04:00
DottsGit 27460be0ea fix: scoping 2026-06-06 02:03:05 -04:00
DottsGit 33f5c7cb82 feat: added advanced settings for showing player movement debug and settings for mouse sensistivity 2026-06-06 00:51:53 -04:00
DottsGit 0c00f4c385 feat: adding better animations 2026-06-06 00:37:54 -04:00
DottsGit acd495893d feat: added ragdoll, health, death, and adjusted mortar 2026-06-06 00:01:27 -04:00
DottsGit 8984739334 feat: added animations for movement 2026-06-05 13:42:18 -04:00
DottsGit 72346803a9 feat: humanoid player model without animations 2026-06-05 13:37:43 -04:00
DottsGit a86ef53622 feat: implement modular state-based player movement system with chain mechanics 2026-06-04 10:26:18 -04:00
DottsGit 0fd921481b feat: implement movement state machine, FPS camera rig, and test level builder scaffolding 2026-06-04 00:29:19 -04:00
DottsGit da277e9d35 feat: implement player movement controller and state machine with dash, slide, and wall-run mechanics 2026-06-03 21:55:10 -04:00
Hermes ceeff6a1ab fix: add smoke verifier, camera to TestLevel, fix player collision shape 2026-06-03 15:06:26 -04:00
Hermes 202f67fa32 feat(movement): add movement state machine with air/ground/wallrun/slide/dash/ground states
- MovementStateMachine: core state machine base
- MovementParams: export-rich tunable resource
- StateGround/StateAir: grounded & aeriel locomotion with coyote, buffered jump, bunny hop
- StateWallRun / StateWallCling: wall-based traversal with wall-jump off
- StateSlide: sprint-parallel slide with friction fallout
- StateDash: burst dash with momentum brake
- PlayerMovementController: entry point wiring to CharacterBody3D
- input_map.cfg: full action map reference file
- characters/player/player_base.tscn: placeholder scene
- movement/tests/test_fsm_runner.gd: 9-state unit test runner

Closes #1
2026-06-02 22:36:00 -04:00