2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 22:27:43 +00:00

Fix player dynamic collision

This commit is contained in:
Jack Andersen
2018-02-07 20:18:27 -10:00
parent 2fee221871
commit ae6797f24b
16 changed files with 120 additions and 106 deletions

View File

@@ -75,11 +75,11 @@ zeus::CAABox CPhysicsActor::GetMotionVolume(float dt) const
float up = GetStepUpHeight();
up = zeus::max(up, 0.f);
aabox.accumulateBounds(aabox.max + up);
aabox.accumulateBounds(aabox.max + zeus::CVector3f(0.5f, 0.5f, up + 1.f));
float down = GetStepDownHeight();
down = zeus::max(down, 0.f);
aabox.accumulateBounds(aabox.min + down);
aabox.accumulateBounds(aabox.min - zeus::CVector3f(0.5f, 0.5f, down + 1.5f));
return aabox;
}
@@ -194,7 +194,7 @@ void CPhysicsActor::MoveToOR(const zeus::CVector3f& trans, float d)
ComputeDerivedQuantities();
}
void CPhysicsActor::sub_8011B098(const zeus::CVector3f& trans, float d)
void CPhysicsActor::MoveToInOneFrameWR(const zeus::CVector3f& trans, float d)
{
x18c_moveImpulse += xe8_mass * (trans - x34_transform.origin) * (1.f / d);
}