here's A car physics demo i thought might help someone
phy start
road=1
phy make material road,"road"
phy set material static friction road,0.1
phy set material dynamic friction road,0.3
phy set material restitution road,0.1
phy build material road
LOAD IMAGE "L.BMP",1
`ground
make object box 1,10000,1,10000:position object 1,0,0,0:color object 1,rgb(0,255,0)
phy make rigid body static box 1,road
TEXTURE OBJECT 1,1
`frame back
`frame front
make object mox 3,20,15,40:position object 3,0,15,20
phy make rigid body dynamic box 3
phy set rigid body mass 3,1.1
`join the frame
`wheel rear right
make object box 4,2,10,10:position object 4,13,15,40
phy make rigid body dynamic sphere 4,road
`wheel rear left
make object box 5,2,10,10:position object 5,-13,15,40
phy make rigid body dynamic sphere 5,road
`wheel front right
make object box 6,2,10,10:position object 6,13,15,0
phy make rigid body dynamic sphere 6,road
phy set rigid body mass 6,1.1
`wheel front left
make object box 7,2,10,10:position object 7,-13,15,0
phy make rigid body dynamic sphere 7,road
phy set rigid body mass 7,1.1
`join the right rear wheel to the frame
phy make revolute joint 2, 3, 4, 1, 0, 0, 13, 15, 40
phy set joint break limits 2, 10000, 10000
phy build revolute joint 2
`join the rear left wheel to the frame
phy make revolute joint 3, 3, 5, 1, 0, 0, -13, 15, 40
phy set joint break limits 3, 10000, 10000
phy build revolute joint 3
phy make revolute joint 4, 3, 6, 1, 0, 0, 13, 15, 0
phy set joint break limits 4, 10000, 10000
phy build revolute joint 4
phy make revolute joint 5, 3, 7, 1, 0, 0, -13, 15, 0
phy set joint break limits 5, 10000, 10000
phy build revolute joint 5
make object sphere 3000,10
do
position object 3000,object position x(3),object position y(3),object position z(3)
set object to object orientation 3000,3
move object 3000,-100
point object 3000,object position x(3),object position y(3),object position z(3)
dist#=80.0 : high#=30.5 : angle#=object angle y(3000)+180
set camera to follow 0, object position x(3), object position y(3), object position z(3), angle#, dist#, high#, 1, 0
if keystate(30)=1
phy set rigid body angular velocity 4, 0, -0.1, 0
phy set rigid body angular velocity 5, 0, -0.1, 0
endif
if keystate(32)=1
phy set rigid body angular velocity 4, 0, 0.1, 0
phy set rigid body angular velocity 5, 0, 0.1, 0
endif
if keystate(17)=1
phy add rigid body local force 3, 0, 0, -900,1
endif
phy update
loop
if anyone can make it better i want to see.
Your signature has been erased by a mod, It exceeds 600 x 120