perhaps you want a slightly different limb setup
rem ---------------------------------------------------------------------
rem
rem
rem ---------------------------------------------------------------------
sync on : sync rate 60
make matrix 1,4,4,4,4 : position matrix 1,-2,-0,-2
rem the body
make object cube 1,1
color object 1,rgb(255,0,0)
position object 1,0,0,0
ghost object on 1
rem a chest
make object cube 100,0.2
make mesh from object 1,100
delete object 100
add limb 1,1,1
offset limb 1,1,0,0,0
color limb 1,1,rgb(0,155,0)
rem a shoulder
make object cube 100,0.2
make mesh from object 2,100
delete object 100
add limb 1,2,2
offset limb 1,2,0,0,0.7
color limb 1,2,rgb(0,155,0)
link limb 1,1,2
rem our fake jedi blade :)
make object cube 2,0.5
color object 2,rgb(0,255,0)
scale object 2,20,200,20
position object 2,0,0.5,0
glue object to limb 2,1,2
rem setup the camera
position camera 0,0,2,-2
point camera 0,0,0,0
rem TEMP MAIN LOOP
disable escapekey
while escapekey()=0
rem mouse relation
cx#=wrapvalue(cx#+mousemovey()*0.6)
cy#=wrapvalue(cy#+mousemovex()*0.6)
cz#=wrapvalue(cz#+mousemovez()*0.6)
acx#=curveangle(cx#,acx#,1.1)
acy#=curveangle(cy#,acy#,1.1)
acz#=curveangle(cz#,acz#,1.1)
rotate object 1,0,acy#,0
if mouseclick()=1
rotate limb 1,1,0,-45,0
rotate limb 1,2,0,0,90
else
rotate limb 1,1,0,0,0
rotate limb 1,2,0,0,0
endif
sync
endwhile
delete matrix 1
delete object 1
delete object 2
end