JoltPhysics3D: Skip the rigid body update if no physics step took place

This improves the framerate if FPS > physics rate
This commit is contained in:
SirLynix
2023-11-26 21:28:40 +01:00
parent 72182327dd
commit f09175228d
3 changed files with 12 additions and 7 deletions

View File

@@ -59,15 +59,15 @@ namespace Nz
void RefreshBodies();
inline void RegisterStepListener(JoltPhysicsStepListener* character);
inline void RegisterStepListener(JoltPhysicsStepListener* stepListener);
void SetGravity(const Vector3f& gravity);
void SetMaxStepCount(std::size_t maxStepCount);
void SetStepSize(Time stepSize);
void Step(Time timestep);
bool Step(Time timestep);
inline void UnregisterStepListener(JoltPhysicsStepListener* character);
inline void UnregisterStepListener(JoltPhysicsStepListener* stepListener);
JoltPhysWorld3D& operator=(const JoltPhysWorld3D&) = delete;
JoltPhysWorld3D& operator=(JoltPhysWorld3D&&) = delete;