Hi, HowDo, Very thanks, These commands are new for me.. I will try.
By now I reduce the problem using
fps=screen fps()
phy set fixed timing (60.0/fps)
But I do a simple example to study:
sync rate 60
sync on
phy start
phy make material 3, "no bounce"
phy set material restitution 3, 0.0
phy set material static friction 3, 0.6
phy set material dynamic friction 3, 0.4
phy build material 3
Make object box 1,1000,5,1000
position object 1,0,0,0
phy make rigid body static box 1,3
Make object box 2,1000,200,5
position object 2,0,100,500
phy make rigid body static box 2,3
Make object box 3,1000,200,5
position object 3,0,100,-500
phy make rigid body static box 3,3
Make object box 4,5,200,1000
position object 4,-500,100,0
phy make rigid body static box 4,3
Make object box 5,5,200,1000
position object 5,500,100,0
phy make rigid body static box 5,3
fazbolinha(6,120,0,0,255)
phy make rigid body dynamic sphere 6
phy set rigid body kinematic 6,1
for id=32 to 255
fazparalelepipedo(id,29,100,100,100)
position object id,int(id /16)*60-450+rnd(30),150+rnd(10),(id and 15)*60-450+rnd(1)
phy make rigid body dynamic box id,3
phy set rigid body mass id,2000
next
position camera 0,1000,-1000
point camera 0,20,0
do
set cursor 0,0
fps=screen fps()
phy set fixed timing (60.0/fps)
print "Fps:";fps
print "1 - g=10"
print "2 - g=50"
print "3 - g=400"
print "4 - g=800"
print "5 - g=1600"
if leftkey() then x#=x#-5
if rightkey() then x#=x#+5
if upkey() then z#=z#+5
if downkey() then z#=z#-5
phy set rigid body kinematic position 6,x#,0,z#
point camera x#,0,z#
i$=inkey$()
if i$="1" then phy set gravity 0,-10,0
if i$="2" then phy set gravity 0,-50,0
if i$="3" then phy set gravity 0,-400,0
if i$="4" then phy set gravity 0,-800,0
if i$="5" then phy set gravity 0,-1600,0
phy update
sync
loop
end
function fazbolinha(i,tam,r,g,b)
make object sphere i, tam
color object i, rgb( r, g, b )
set object specular i, rgb ( r,g,b)
set object specular power i, 255
set object ambient i,0
endfunction
function fazparalelepipedo(i,tam,r,g,b)
make object box i, tam,tam,tam*2
color object i, rgb( r, g, b )
set object specular i, rgb ( r,g,b)
set object specular power i, 255
set object ambient i,0
endfunction
I try some ideas like add mass, use sleep, etc and I cant reache a good stone like efect...
Thanks,
Eduardo.
Bit9 - www.Bit9.com.br