Hi to all 😀 ,
I have to determine the velocity to add the Doppler effect.
The fmod manual says that I have to use these formulas:
velx = (posx – lastposx) * 1000 / timedelta;
velz = (posy – lastposy) * 1000 / timedelta;
velz = (posz – lastposz) * 1000 / timedelta;

The problem is that I have a non constant frame rate to I need to determine timedelta. The doc says to use timeGetTime() to get something as:
delta = current_time – last_update_time.
Is there a linux related routine? How must I call it?
Thank to all.

  • You must to post comments

Take a look at the man page for gettimeofday() thats what we use internally on Linux.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.