Adds MMD rigid-body physics (hair, skirts, tails) using Bullet 3.25 (FetchContent; only BulletDynamics, BulletCollision, LinearMath).
Loading: PMX display frames are now skipped properly and rigid bodies + joints parsed; PMD rigid bodies/joints parsed after the toon names (PMD body positions are bone-relative). New RigidBody/Joint in Model.h; setRigidBodyFromMmd/setJointFromMmd convert MMD's left-handed Euler angles and joint limits.
Simulation (src/physics/PhysicsWorld, part of mr_core so the vtuber fork gets it): mode 0 bodies are kinematic and follow their bone; mode 1 drive their bone; mode 2 drive rotation but stay pinned to the bone position. btGeneric6DofSpringConstraint joints with springs, collision groups/masks, gravity 98 (MMD units), fixed 1/120 s substeps.
Poser: after animation/IK, PhysicsWorld::apply overwrites driven bones and non-simulated descendants are recomputed. resetPhysics() snaps bodies to the pose and settles 0.5 s; stepPhysics(dt) queues time.
App: steps by real time while editing/playing, exactly 1/30 s per frame during renders; timeline jumps over 2 frames reset physics. Scene panel and View menu toggles, Reset physics, --physics on|off.
Test: testPhysics swings a hinged capsule down under gravity and checks it stays attached.
Not yet: collision-shape debug overlay, afterPhysics bone ordering, PMX 2.1 soft bodies.
Adds MMD rigid-body physics (hair, skirts, tails) using Bullet 3.25 (FetchContent; only `BulletDynamics`, `BulletCollision`, `LinearMath`).
- **Loading**: PMX display frames are now skipped properly and rigid bodies + joints parsed; PMD rigid bodies/joints parsed after the toon names (PMD body positions are bone-relative). New `RigidBody`/`Joint` in `Model.h`; `setRigidBodyFromMmd`/`setJointFromMmd` convert MMD's left-handed Euler angles and joint limits.
- **Simulation** (`src/physics/PhysicsWorld`, part of `mr_core` so the vtuber fork gets it): mode 0 bodies are kinematic and follow their bone; mode 1 drive their bone; mode 2 drive rotation but stay pinned to the bone position. `btGeneric6DofSpringConstraint` joints with springs, collision groups/masks, gravity 98 (MMD units), fixed 1/120 s substeps.
- **Poser**: after animation/IK, `PhysicsWorld::apply` overwrites driven bones and non-simulated descendants are recomputed. `resetPhysics()` snaps bodies to the pose and settles 0.5 s; `stepPhysics(dt)` queues time.
- **App**: steps by real time while editing/playing, exactly 1/30 s per frame during renders; timeline jumps over 2 frames reset physics. Scene panel and View menu toggles, Reset physics, `--physics on|off`.
- **Test**: `testPhysics` swings a hinged capsule down under gravity and checks it stays attached.
Not yet: collision-shape debug overlay, `afterPhysics` bone ordering, PMX 2.1 soft bodies.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Adds MMD rigid-body physics (hair, skirts, tails) using Bullet 3.25 (FetchContent; only
BulletDynamics,BulletCollision,LinearMath).RigidBody/JointinModel.h;setRigidBodyFromMmd/setJointFromMmdconvert MMD's left-handed Euler angles and joint limits.src/physics/PhysicsWorld, part ofmr_coreso the vtuber fork gets it): mode 0 bodies are kinematic and follow their bone; mode 1 drive their bone; mode 2 drive rotation but stay pinned to the bone position.btGeneric6DofSpringConstraintjoints with springs, collision groups/masks, gravity 98 (MMD units), fixed 1/120 s substeps.PhysicsWorld::applyoverwrites driven bones and non-simulated descendants are recomputed.resetPhysics()snaps bodies to the pose and settles 0.5 s;stepPhysics(dt)queues time.--physics on|off.testPhysicsswings a hinged capsule down under gravity and checks it stays attached.Not yet: collision-shape debug overlay,
afterPhysicsbone ordering, PMX 2.1 soft bodies.