is in file ../applications\demosSandbox\sdkDemos\toolBox\PhysicsUtils.cpp
by the end.
Moderators: Sascha Willems, walaber
Julio Jerez wrote:is in file ../applications\demosSandbox\sdkDemos\toolBox\PhysicsUtils.cpp
by the end.
// G factor: Add up force of gravity, centripetal force and any force due to the powered flight:
dVector dvFG = dVector(0.0f, 0.0f, 0.0f);
entSource->GetGravityForce(dvFG);
#if 1
dVector dvFC = dVector(0.0f, 0.0f, 0.0f);
dVector dvFB = dVector(0.0f, 0.0f, 0.0f);
// entSource->GetCentripetalForce(dvFC);
dvFB = dvAccelerationTotal.Scale(entSource->GetCurrentBodyMass());
dVector dvForceSum = dvFG + dvFC - dvFB;
#else
dVector dvForceSum = entSource->GetTotalAcceleration();
#endif
NavData.dGFactor = abs(vLength(dvForceSum) / vLength(dvFG));
Users browsing this forum: No registered users and 27 guests