hey this is a small thing i made with a box guy swinging on a bar.if u take off the legs u can do flips
press space to give force
shift to restart
im trying to make a side game with physics where you'll have to jump & grab poles,swing etc like a platform game.
hide mouse : autocam off : position camera 0,40,-35 : point camera 0,5,0
phy start
do
if spacekey() then phy add rigid body force 2,0,0,0.1,2
rotate camera camera angle x()+mousemovey(),camera angle y()+mousemovex(),0
if mouseclick()=1 then move camera 0.2
if mouseclick()=2 then move camera -0.2
`*restart game*
if shiftkey() and game=1
for n=1 to 11
phy delete joint n
next n
for n=1 to 100
if object exist(n)
phy delete rigid body n
delete object n
endif
next n
game=0
endif
if game=0 then gosub make_game
phy update
sync
loop
`***gosubs***
make_game:
make object box 1,150,1,150 : color object 1,rgb(rnd(255),rnd(255),rnd(255))
`body
make object box 2,2,9,2 : position object 2,0,12,0
`arms
make object box 3,1,5,1 : position object 3,-1.6,18,0
make object box 4,1,5,1 : position object 4,1.6,18,0
make object sphere 5,2 : position object 5,0,18,0
`hands
make object box 6,1,0.5,2 : position object 6,-1.6,20.2,0.5
make object box 7,1,0.5,2 : position object 7,1.6,20.2,0.5
make object cube 8,1 : position object 8,-1.6,20,1.4
make object cube 9,1 : position object 9,1.6,20,1.4
`legs
make object box 10,1.3,6,1.3 : position object 10,-1,5,0
make object box 11,1.3,6,1.3 : position object 11,1,5,0
`pole
make object sphere 100,0.2 : scale object 100,8800,100,100
position object 100,0,19.8,0.7 : color object 100,rnd(15000)
phy make rigid body static box 1
for n=2 to 11
color object n,rgb(rnd(255),rnd(255),rnd(255))
phy make rigid body dynamic box n
next n
phy make fixed joint 1,2,5
phy make fixed joint 2,3,5
`arm joints
`phy make revolute joint 3,3,2,15,0,0,-1.6,15,0
`phy make revolute joint 4,4,2,15,0,0,1.6,15,0
phy make fixed joint 3,4,5
phy make fixed joint 4,3,6
`hands
phy make fixed joint 5,5,2
phy make fixed joint 6,6,3
phy make fixed joint 7,7,4
phy make fixed joint 8,8,6
phy make fixed joint 9,9,7
`legs
phy make revolute joint 10,10,2,20,0,0,-1,8,0
phy make revolute joint 11,11,2,20,0,0,1,8,0
`pole
phy make rigid body static mesh 100
game=1
return