physics findings

rigid: main finding is rigid needs to take delta into account for integration (aka interpolation)
also used POINT_EPSILON for thresholds for consistency

for rigidshape/item/player, main finding was length calcs for the search area were all over the place,
so we now derive the extended length of the cached area based on the velocity and the object's radius itself rather than guessin per class

atrest gravity calc suplimental syncing between rigidshape and vehicle

**remindernote POINT_EPSILO is 0.0001
This commit is contained in:
AzaezelX 2025-12-13 17:41:21 -06:00
parent af73e79424
commit 4c083d713d
6 changed files with 15 additions and 14 deletions

View file

@ -827,7 +827,7 @@ void Vehicle::updatePos(F32 dt)
{
F32 k = mRigid.getKineticEnergy();
F32 G = mNetGravity* dt * TickMs / mDataBlock->integration;
F32 Kg = 0.5 * mRigid.mass * G * G;
F32 Kg = mRigid.mass * G * G * TickSec;
if (k < sRestTol * Kg && ++restCount > sRestCount)
mRigid.setAtRest();
}