RandyGaul / qu3e

Lightweight and Simple 3D Open Source Physics Engine in C++
zlib License
920 stars 110 forks source link

Can this physics engine change its timescale on the fly? #49

Closed Rorybabory closed 4 years ago

Rorybabory commented 4 years ago

I'm trying to use this physics engine for a game I'm working on but I don't know how to adjust the scene timescale based on what the fps is. Like if the fps drops down to 30, how do I make the physics do more per cycle?

RandyGaul commented 4 years ago

I designed the library with a fixed time step for determinism, but you can adjust this by altering the code slightly. You can see the dt variable passed into the scene constructor. Simply modify this value.

Rorybabory commented 4 years ago

Cool I just did that and it worked.

RandyGaul commented 4 years ago

Nice!