Body step 2.6: landing dip, jump, stick crouch, no flip looking down, smooth view
- Look-down flip: body facing from BodyMath.HeadFacing (visor + crown), robust past vertical; stick direction uses it too; crouch lean pitch measured against the facing. - Landing: falling legs touch down only within their reach, so leg strength stops the body below its stance (dip scales with impact, big falls fold the legs). Rise eased so gravity can stop it at the stance; legs untuck speed-limited. Fixed the vertical play-space correction leaking into ground control's feed-forward (a bounce). - Jump on right A: countermovement dip + leg push over the stroke (crouch = higher). - Stick crouch on right stick Y (RagdollDriver.StickCrouch: virtual floor offset). - Menu summon on left X only. - XR origin drawn with the bodies' physics interpolation (camera/body desync). - RagdollSpike: landing/fall/jump/look-down/stick-crouch phases, `-- only=` filter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
84df772f38
commit
e821728fba
7 files changed
+1379
-1043
No files matched your search
@@ -68,6 +68,11 @@ public sealed class RagdollDriver
|
||||
public TrueBodySolver Solver;
|
||||
public PlayerRagdoll Ragdoll;
|
||||
public bool RebuildRequested = true;
|
||||
// Stick crouch (right stick down), metres: the play-space floor is treated as this far ABOVE where
|
||||
// it is. The True Body then reads the head as that much lower (crouch pose), ground control and
|
||||
// the view's re-centering settle the play space that far below the ground — so the camera rides
|
||||
// down with the crouching body, and nothing feeds back (same play-space-relative rule as 2.5).
|
||||
public float StickCrouch;
|
||||
private double _now;
|
||||
|
||||
// origin = play space (modified by the correction); raw* = origin-local tracked poses as last
|
||||
@@ -79,15 +84,16 @@ public sealed class RagdollDriver
|
||||
_now += dt;
|
||||
Transform3D head = Head.Sample(rawHead, _now), left = Left.Sample(rawLeft, _now), right = Right.Sample(rawRight, _now);
|
||||
if (Ragdoll.Built && !RebuildRequested)
|
||||
origin.Origin += Ragdoll.OriginCorrection((origin * head).Origin, origin.Origin.Y, dt);
|
||||
origin.Origin += Ragdoll.OriginCorrection((origin * head).Origin, origin.Origin.Y + StickCrouch, dt);
|
||||
float floorY = origin.Origin.Y + StickCrouch;
|
||||
Transform3D h = origin * head, l = origin * left, r = origin * right;
|
||||
Solver.Solve(profile, h, l, r, origin.Origin.Y, dt);
|
||||
Solver.Solve(profile, h, l, r, floorY, dt);
|
||||
if (RebuildRequested || !Ragdoll.Built)
|
||||
{
|
||||
Ragdoll.Build(profile, Solver, l, r);
|
||||
RebuildRequested = false;
|
||||
}
|
||||
Vector3 lv = origin.Basis * Left.Velocity + moveVelocity, rv = origin.Basis * Right.Velocity + moveVelocity;
|
||||
Ragdoll.Step(Solver, l, r, lv, rv, origin.Origin.Y, dt);
|
||||
Ragdoll.Step(Solver, l, r, lv, rv, floorY, dt);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user