test(physics): pin issue 270 animation fixes
This commit is contained in:
parent
bb1640f777
commit
0cb60d98a0
7 changed files with 337 additions and 43 deletions
|
|
@ -168,9 +168,6 @@ internal sealed class LiveEntityNetworkUpdateController
|
|||
System.Numerics.Vector3 worldPos,
|
||||
uint cellId)
|
||||
{
|
||||
if (cellId == 0)
|
||||
return;
|
||||
|
||||
var (radius, height) = _motionRuntime.GetSetupCylinder(serverGuid, entity);
|
||||
if (radius < 0.05f)
|
||||
{
|
||||
|
|
@ -193,33 +190,20 @@ internal sealed class LiveEntityNetworkUpdateController
|
|||
// retail's first frame would (position snapped onto the floor,
|
||||
// contact plane + CONTACT/ON_WALKABLE committed below). A sweep that
|
||||
// finds no floor (true airborne spawn) leaves the body airborne.
|
||||
AcDream.Core.Physics.ResolveResult settle = _physicsEngine.ResolveWithTransition(
|
||||
worldPos,
|
||||
worldPos + new System.Numerics.Vector3(0f, 0f, -0.5f),
|
||||
cellId,
|
||||
sphereRadius: radius,
|
||||
sphereHeight: height,
|
||||
stepUpHeight: 0.4f,
|
||||
stepDownHeight: 0.4f,
|
||||
isOnGround: false,
|
||||
body: remote.Body,
|
||||
moverFlags: moverFlags,
|
||||
movingEntityId: entity.Id);
|
||||
if (!settle.Ok || !settle.InContact)
|
||||
return; // no floor within reach — stays airborne like retail's fall
|
||||
|
||||
remote.Body.Position = settle.Position;
|
||||
|
||||
AcDream.Core.Physics.PhysicsObjUpdate.CommitSetPositionTransition(
|
||||
if (!RemoteSpawnPlacementSettler.TrySettle(
|
||||
_physicsEngine,
|
||||
remote.Body,
|
||||
settle.InContact,
|
||||
settle.OnWalkable,
|
||||
settle.CollisionNormalValid,
|
||||
settle.CollisionNormal,
|
||||
previousContact: false,
|
||||
previousOnWalkable: false,
|
||||
worldPos,
|
||||
cellId,
|
||||
radius,
|
||||
height,
|
||||
moverFlags,
|
||||
entity.Id,
|
||||
remote.Movement.HitGround,
|
||||
remote.Motion.LeaveGround);
|
||||
remote.Motion.LeaveGround))
|
||||
{
|
||||
return; // no floor within reach — stays airborne like retail's fall
|
||||
}
|
||||
remote.Airborne = !remote.Body.OnWalkable;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue