2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-10 04:27:42 +00:00

Working CParasite

This commit is contained in:
Jack Andersen
2018-11-18 19:04:33 -10:00
parent 22da3a0f89
commit fbe144bbbd
5 changed files with 15 additions and 16 deletions

View File

@@ -145,12 +145,11 @@ void CWallWalker::PreThink(float dt, CStateManager& mgr)
{
zeus::CPlane plane = x568_alignNormal.GetPlane();
const float futureDt = (10.f * dt);
SetTranslation(GetTranslation() * (1.f - futureDt) +
(((GetTranslation() - ((plane.vec.dot(GetTranslation())) - plane.d) -
x590_colSphere.GetSphere().radius - 0.1f) * plane.vec) * futureDt));
SetTranslation(zeus::CVector3f::lerp(GetTranslation(),
GetTranslation() - (plane.pointToPlaneDist(GetTranslation()) -
x590_colSphere.GetSphere().radius - 0.01f) * plane.vec, futureDt));
}
else
MoveCollisionPrimitive(zeus::CVector3f::skZero);
MoveCollisionPrimitive(zeus::CVector3f::skZero);
}
void CWallWalker::Think(float dt, CStateManager& mgr)