physics notes

based on https://github.com/TorqueGameEngines/Torque3D/pull/1165 and after further talks with @AtomicWalrus:
use the massbox or bounds box based  mRigid.setObjectInertia method
to reduce recirulating, combine resolvecollision and resolvecontacts
clamp seperation force for contact resolution
gravity normalized to earth standard (9.8,not 20)
take delta-time into account *once* for kinetic energy vs gravity rest checks
and for debug purposes, expose mRigid.atRest to the inspector to see if it's truly at reast or grinding calcs to minimal effect
This commit is contained in:
AzaezelX 2023-12-28 21:04:16 -06:00
parent 4c58a3601f
commit 3c7d2b1b6a
4 changed files with 57 additions and 22 deletions

View file

@ -216,8 +216,8 @@ class RigidShape: public ShapeBase
bool onNewDataBlock( GameBaseData *dptr, bool reload );
void updatePos(F32 dt);
bool updateCollision(F32 dt);
bool resolveCollision(Rigid& ns,CollisionList& cList);
bool resolveContacts(Rigid& ns,CollisionList& cList,F32 dt);
bool resolveCollision(Rigid& ns,CollisionList& cList, F32 dt);
bool resolveContacts(Rigid& ns,CollisionList& cList, F32 dt);
bool resolveDisplacement(Rigid& ns,CollisionState *state,F32 dt);
void checkTriggers();
static void findCallback(SceneObject* obj,void * key);