I do not understand how this command is supposed to work b/c the documentation does not explain it very well.
But I do believe that it is bugged in any case as I have experimented with many values, and tried the command before the main loop and inside the loop. Either the scene doesn't move at all, or it jumps once to insane values then doesn't move again. Media attached.
Rem Project: physx1
Rem Created: 9/9/2006 9:03:56 PM
Rem ***** Main Source File *****
sync rate 120
load image "grass2.bmp",4
load image "stratat.bmp",3
make object terrain 1
set terrain heightmap 1,"stratah.bmp"
set terrain split 1,16
set terrain scale 1,12.0,1.2,12.0
set terrain texture 1,3,4
set terrain tiling 1,1
set terrain light 1,0,0,0,1,1,1,1
build terrain 1
`phy set gravity 0.0,-19.6,0.0
`phy set default sleep linear velocity squared 400.0
`phy set bounce threshold 0.0
`phy set auto fixed timing
phy make material 2,"Rubber"
phy set material dynamic friction 2,0.2
phy set material static friction 2,0.2
phy set material restitution 2,0.2
phy build material 2
phy make rigid body static terrain 1,2
make object sphere 2,1
position object 2,3000,350,1000
phy make rigid body dynamic sphere 2,2
position camera 0,3100,400,1100
`phy set timing 50.0,8,1
phy set rigid body linear velocity 2,-50.0,51.99,90.0
phy set rigid body max angular velocity 2,1000
`phy set rigid body angular momentum 2,0.0,10000.0,0.0
phy set rigid body mass 2,10.0
set shadow shading on 2,0,100,1
`phy set rigid body sleep linear velocity 2,500.0
`phy set rigid body linear damping 1,0.0
`phy set rigid body linear damping 2,0.0
`phy set timing 60.0,1,0
`x#=phy get rigid body linear velocity x (2)
`y#=phy get rigid body linear velocity y (2)
`z#=phy get rigid body linear velocity z (2)
`if x#<128.0 then x#=x#+0.01
`phy set rigid body linear velocity 2,x#,y#,z#
if controlkey() then phy set rigid body angular velocity 2,100.0,0.0,0.0
`control camera using arrowkeys 0,2,2
point camera 0,object position x(2),object position y(2),object position z(2)
position camera 0,camera position x(0),object position y(2)+50,camera position z(0)
set camera to follow 0,object position x(2),object position y(2),object position z(2),90,50,5,50.0,1
phy set timing 20.0,2,1
text 10,10,str$(object position x(2))
text 10,20,str$(object position y(2))
text 10,30,str$(object position z(2))
Also, why is it that when using auto fixed timing the scene will not behave in a linear fashion? Sometimes it goes into slo motion and sometimes it goes into fast forward.
Also, when using auto fixed timing, everything behaves as if it's on the moon. I realize I could increase gravity to make things fall more quickly, but that doesn't really answer the question of whether the timing is really correct when using auto fixed timing. If I take out all the timing commands it seems more realistic. Increasing the gravity to compensate for a slow simulation will also affect other forces in such a way as to throw off the reality of the simulation.
If auto fixed timing is actually correct, then the default gravity of -9.8 must be incorrect. If the default gravity is correct, then auto fixed timing must be incorrect. Either way something is not right.