ok i copied the code from th 6dof demo,ive got this.
can anyone tell me how to completely take away all force from my ragdoll when i press space to set its position again???
`my own physics ragdoll test
`how do i make a 6dof joint for each limb??????
autocam off : position camera 0,15,-55 : point camera 0,8,0
`head
make object sphere 1,2.5 : position object 1,0,15,0
`arms
make object box 2,4,1,2 : position object 2,-4,12,0
clone object 3,2 : position object 3,4,12,0
`body
make object box 4,2,8,2 : position object 4,0,9,0
`legs
make object box 5,1.5,6,1.5 : position object 5,-1.5,1,0
clone object 6,5 : position object 6,1.5,1,0
`ground
make object box 100,150,1,150 : position object 100,0,-20,0
`color
for n=1 to 100
if object exist(n)
color object n,rnd(150000)
endif
next n
`phy setup
phy start
phy make rigid body dynamic sphere 1
for n=2 to 6
phy make rigid body dynamic box n
next n
phy make rigid body static box 100
`joint setup
phy make 6dof joint 1, 1, 4
phy set 6dof joint global anchor 1, 0, 0, 5, 0
phy set 6dof joint global axis 1, 0, 0, 1, 0
phy set 6dof joint twist motion 1, 1
phy set 6dof joint swing1 motion 1, 1
phy set 6dof joint swing2 motion 1, 1
phy set 6dof joint motion x 1, 0
phy set 6dof joint motion y 1, 0
phy set 6dof joint motion z 1, 0
phy set 6dof joint swing1 limit 1, 0.3 * 1, 0.0, 0.0, 0.0
phy set 6dof joint swing2 limit 1, 0.3 * 1, 0.0, 0.0, 0.0
phy set 6dof joint twist limit 1, -0.05 * 1, 0.0, 0.0, 0.0, -0.05 * 1, 0.0, 0.0, 0.0
phy build 6dof joint 1
phy make 6dof joint 2, 2, 4
phy set 6dof joint global anchor 2, 0, 0, 5, 0
phy set 6dof joint global axis 2, 0, 0, 1, 0
phy set 6dof joint twist motion 2, 1
phy set 6dof joint swing1 motion 2, 1
phy set 6dof joint swing2 motion 2, 1
phy set 6dof joint motion x 2, 0
phy set 6dof joint motion y 2, 0
phy set 6dof joint motion z 2, 0
phy set 6dof joint swing1 limit 2, 0.3 * 1, 0.0, 0.0, 0.0
phy set 6dof joint swing2 limit 2, 0.3 * 1, 0.0, 0.0, 0.0
phy set 6dof joint twist limit 2, -0.05 * 1, 0.0, 0.0, 0.0, -0.05 * 1, 0.0, 0.0, 0.0
phy build 6dof joint 2
phy make 6dof joint 3, 3, 4
phy set 6dof joint global anchor 3, 0, 0, 5, 0
phy set 6dof joint global axis 3, 0, 0, 1, 0
phy set 6dof joint twist motion 3, 1
phy set 6dof joint swing1 motion 3, 1
phy set 6dof joint swing2 motion 3, 1
phy set 6dof joint motion x 3, 0
phy set 6dof joint motion y 3, 0
phy set 6dof joint motion z 3, 0
phy set 6dof joint swing1 limit 3, 0.3 * 1, 0.0, 0.0, 0.0
phy set 6dof joint swing2 limit 3, 0.3 * 1, 0.0, 0.0, 0.0
phy set 6dof joint twist limit 3, -0.05 * 1, 0.0, 0.0, 0.0, -0.05 * 1, 0.0, 0.0, 0.0
phy build 6dof joint 3
phy make 6dof joint 4, 5, 4
phy set 6dof joint global anchor 4, 0, 0, 5, 0
phy set 6dof joint global axis 4, 0, 0, 1, 0
phy set 6dof joint twist motion 4, 1
phy set 6dof joint swing1 motion 4, 1
phy set 6dof joint swing2 motion 4, 1
phy set 6dof joint motion x 4, 0
phy set 6dof joint motion y 4, 0
phy set 6dof joint motion z 4, 0
phy set 6dof joint swing1 limit 4, 0.3 * 1, 0.0, 0.0, 0.0
phy set 6dof joint swing2 limit 4, 0.3 * 1, 0.0, 0.0, 0.0
phy set 6dof joint twist limit 4, -0.05 * 1, 0.0, 0.0, 0.0, -0.05 * 1, 0.0, 0.0, 0.0
phy build 6dof joint 4
phy make 6dof joint 5, 6, 4
phy set 6dof joint global anchor 5, 0, 0, 5, 0
phy set 6dof joint global axis 5, 0, 0, 1, 0
phy set 6dof joint twist motion 5, 1
phy set 6dof joint swing1 motion 5, 1
phy set 6dof joint swing2 motion 5, 1
phy set 6dof joint motion x 5, 0
phy set 6dof joint motion y 5, 0
phy set 6dof joint motion z 5, 0
phy set 6dof joint swing1 limit 5, 0.3 * 1, 0.0, 0.0, 0.0
phy set 6dof joint swing2 limit 5, 0.3 * 1, 0.0, 0.0, 0.0
phy set 6dof joint twist limit 5, -0.05 * 1, 0.0, 0.0, 0.0, -0.05 * 1, 0.0, 0.0, 0.0
phy build 6dof joint 5
do
rotate camera camera angle x()+mousemovey(),camera angle y()+mousemovex(),0
if mouseclick()=1 then move camera 0.5
if mouseclick()=2 then move camera -0.5
if spacekey()
phy set rigid body angular momentum 1,0,0,0
phy set rigid body angular velocity 1,0,0,0
phy set rigid body position 1,0,40,0
endif
phy update
sync
loop