mirror of https://github.com/AxioDL/metaforce.git
CScriptBallTrigger: Fix force calculation
This commit is contained in:
parent
0d934cf608
commit
c3c88a434f
|
@ -66,7 +66,7 @@ void CScriptBallTrigger::Think(float dt, CStateManager& mgr) {
|
|||
} else {
|
||||
const zeus::CVector3f offset = radiusPosDif.normalized();
|
||||
if (std::cos(zeus::degToRad(x154_minAngle)) < (-offset).dot(x15c_forceAngle) && distance < x158_maxDistance) {
|
||||
const float force = zeus::min((1.f / dt * distance), x150_force * (distance * distance));
|
||||
const float force = zeus::min((1.f / dt * distance), x150_force * (x158_maxDistance / (distance * distance)));
|
||||
player.ApplyForceWR(force * (player.GetMass() * offset), zeus::CAxisAngle());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue