Hello,
If you can move it on the y axis, why can't you use the same method to move the limb on the z or x axis?
You should be using the OFFSET LIMB command to change the position of the limb. Also use MOUSEMOVEX(), MOUSEMOVEY() - I don't have a mouse with a wheel so I never use MOUSEMOVEZ() so I can't help you on that one.
Essentially, you will test if the proper button is pressed. If so, you want to test the mouse movement. If the mouse movement is < 0 then offset the limb in a direction on an axis at some increment. If the mouse movement > 0 go in the opposite direction.
As far as the camera, you can train it on the limb if you want with the SET CAMERA TO FOLLOW COMMAND. I'll leave that to you.
rem move limb with mouse
rem latch grapple
rem october 17,2006
rem setup display
set display mode 800,600,32
autocam off
sync on
sync rate 60
hide mouse
rem make objects
make object cube 1,25
make object sphere 2,25
rem put sphere next to cube
position object 2,50,0,0
rem make sphere a limb of the cube
make mesh from object 1,2
add limb 1,1,1
rem delete molds for limb
delete object 2
delete mesh 1
rem position camera
position camera 25,0,-75
rem get limb position
x#=limb position x(1,1)
y#=limb position y(1,1)
z#=limb position z(1,1)
do
rem check for left button
if mouseclick()=1
rem check for X movement of mouse
if mousemovex() < 0
dec x#
offset limb 1,1,x#,y#,z#
endif
if mousemovex() > 0
inc x#
offset limb 1,1,x#,y#,z#
endif
rem check for y movement of mouse and apply it to z
if mousemovey() > 0
dec z#
offset limb 1,1,x#,y#,z#
endif
if mousemovey() < 0
inc z#
offset limb 1,1,x#,y#,z#
endif
print "Controlling X and Z for sphere limb"
set cursor 0,0
print "X = ";x#
print "Z = ";z#
endif
rem check for right button
if mouseclick()=2
rem check y movement of mouse
if mousemovey() > 0
dec y#
offset limb 1,1,x#,y#,z#
endif
if mousemovey() < 0
inc y#
offset limb 1,1,x#,y#,z#
endif
set cursor 0,0
print "Controlling Y for sphere limb"
print "Y = ";y#
endif
sync
loop
Enjoy your day.