Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark Physics & Dark A.I. & Dark Dynamix / [DarkPhysics] phy set timing

Author
Message
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 7th Aug 2006 20:31
I don't quite understand how to use this command, what I'm wanting is to have my engine perform as many screen refreshes as possible but make the physics simulation run at a constant rate (but allow for variance like slow motion for cut scenes).

Has anybody implemented this yet?

I know the voices aren't real, but they have good ideas!
The Nerd
19
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Denmark
Posted: 7th Aug 2006 20:34 Edited at: 7th Aug 2006 20:36
If you navigate to "Projects -> Demos -> Rigid Body -> Fixed Rate Timing" you will find an example that show how to use the command. It works very well actually

This example uses the command phy set auto fixed timing

monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 7th Aug 2006 20:39 Edited at: 7th Aug 2006 20:51
I have just looked through all the projects too and didn't see that!

Cheers The Nerd , how I missed that I don't know

EDIT: Yeah fixed rate, I'm wanting variable rate and independant of the FPS.

See the syntax for the command is



But what does it all mean? Like the maximum step param 1.0 / 60.0
is that 60 updates for second??

I know the voices aren't real, but they have good ideas!
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 7th Aug 2006 23:06 Edited at: 7th Aug 2006 23:24
EDIT:

Cracked it, the best way I have found to implement slow mo taking into account the fps is:

[PSEUDO CODE]
max_timesteps (default 1.0 / 60.0)
max_iterations (default 8)

if SlowMo
phy set timing max_timesteps / screen fps( ), max_iterations
else
phy set timing max_timesteps, max_iterations
endif

I know the voices aren't real, but they have good ideas!

Login to post a reply

Server time is: 2024-04-20 13:40:17
Your offset time is: 2024-04-20 13:40:17