Posted: 17 Dec 2017, 17:59
Hi !
I'm trying to build a physics engine for a new module,
most of the updates are done inside callback (record, play, mouse, inputs...)
but still the physics should be computed regularly even so there is no callbacks called back.
so some computation should be done in the onProcess() loop
what would be the best option(s) to have the physic engine tamed to reasonable speed ?
- just leave it as it is in the onProcess to be computed each time onProcess is called ?
- use samplerate and blocksize to have the computing done once every "n" blocks ?
- using system time ?
if someone is willing to share some code that just does that, it will be cool !
thanx
Olivar
I'm trying to build a physics engine for a new module,
most of the updates are done inside callback (record, play, mouse, inputs...)
but still the physics should be computed regularly even so there is no callbacks called back.
so some computation should be done in the onProcess() loop
what would be the best option(s) to have the physic engine tamed to reasonable speed ?
- just leave it as it is in the onProcess to be computed each time onProcess is called ?
- use samplerate and blocksize to have the computing done once every "n" blocks ?
- using system time ?
if someone is willing to share some code that just does that, it will be cool !
thanx
Olivar