Added boarder to stop dices falling out , however can't seem to get the force to throw them up the table, anyone see where i am going wrong on this (object 10 is the one its being applied too.).
Rem ***** Main Source File *****
phy start
sync on
sync rate 0
autocam off
rem Setup camera and light
`make light 1
`position light 1,0,1000,0
`set point light 0,-100,1000,-100
position camera 0,0,1500,-500
`position camera 0,0,100,-150
point camera 0,0,-180,135
`SET CAMERA RANGE 0,200,2500
make object box 1,2500,1,2000
position object 1,0,0,0
color object 1,rgb(0,255,0)
set object specular 1, rgb ( 0, 255 ,0 )
set object specular power 1, 255
set object ambient 1,255
`rotate object 1,0,180,0
phy make rigid body static box 1
`point light 1,0,object position x(1),0
make object box 2,2500,200,1
position object 2,0,100,950
phy make rigid body static box 2
make object box 3,2500,200,1
position object 3,0,100,-950
phy make rigid body static box 3
make object box 4,1,200,2000
position object 4,-950,100,0
phy make rigid body static box 4
make object box 5,1,200,2000
position object 5,950,100,0
phy make rigid body static box 5
rem object can be found here
rem http://forum.thegamecreators.com/?m=forum_view&t=67876&b=1&p=1
load object "Dice_Cube01.x",10
`make object cube 10,100
position object 10,10,600,0
clone object 11,10
position object 11,-10,600,0
`set shadow shading on 10
`set shadow shading on 11
phy make rigid body dynamic box 10
phy make rigid body dynamic box 11
phy set rigid body rotation 10, rnd(360), rnd(360),rnd(360)
do
`set object specular power 1, 255
`set object ambient 1,255
center text screen width()/2,0,"press space to restart"
if spacekey()
phy set rigid body rotation 10, rnd(360), rnd(360),rnd(360)
phy set rigid body position 10,50.0,600.0,0.0
phy set rigid body rotation 11, rnd(360), rnd(360),rnd(360)
phy set rigid body position 11,-50.0,600.0,0.0
`phy set rigid body linear velocity 10,0,0.5,0.5
phy set rigid body linear velocity 11,0,0.5,0.5
phy add rigid body force 10,0.0,0.0,0.2,50.0,600.0,0.0,2
endif
phy update
sync
loop
Dark Physics makes any hot drink go cold.