Theorically, PHY SET AUTO FIXED TIMING do this:
When using a sync rate of 0 so that your application runs as fast as possible then you may prefer to link the elapsed time between calls to the simulation to the frame rate. This is achieved by making a call to phy set auto fixed timing. When using this command your program will produce the same results whether it is running at 30 fps or 130 fps.
but, in reality, it does not work.
Here is a small source code showing the problem:
Sync On : Sync Rate 60
Autocam Off
Phy Set Auto Fixed Timing
PHY Start
PHY Set Gravity 0, 9.81, 0
Make Object Plain 1, 512, 512
Rotate Object 1, 90, 0, 0
Hide Object 1
Make Object Plain 3, 512, 512
Rotate Object 3, 90, 0, 0
PHY Make Rigid Body Static Mesh 1
Rotate Object 1, 0, 0, 0
Make Object Cube 2, 64
Position Object 2, 0, 256, 0
PHY Make Box Character Controller 2, 0, 256, 0, 64, 64, 64, 1, 16, 45
Position Camera 0, 64, -512
Rotate Camera 0, 0, 0, 0
Repeat
If KeyState( 2 ) = 1 Then Sync Rate 10
If KeyState( 3 ) = 1 Then Sync Rate 60
If KeyState( 4 ) = 1 Then Sync Rate 150
If KeyState( 5 ) = 1 Then Sync Rate 0
OldSpace = Space : Space = SpaceKey()
If OldSpace = 0 And Space = 1
XRotate Object 2, WrapValue( Object Angle X( 2 ) - 90 )
PHY Move Character Controller 2, 3000.0
XRotate Object 2, WrapValue( Object Angle X( 2 ) + 90 )
Endif
PHY Move Character Controller 2,0.0001
Set Cursor 0, 0 : Print "Actual Frame Rate : ", Screen FPS()
PHY Update
Sync
Until EscapeKey() = 1
PHY End
End
If you change frame rates using keys 1-4 (10,60,150,Max) and press space, you'll see that the object does not JUMP at the same speed.
All we have to decide is what to do with the time that is given to us.