I've been trying to use
PICK OBJECT to move objects along the X and Z axes (for starters) but I was having a problem with the objects "jumping" on the initial mouse click.
make object cube 1,1:yrotate object 1,90:move object 1,.5
make object sphere 2,1:yrotate object 2, -90:move object 2,.5
size#=object size(1)/100
do
if CL=0 then ThisObject=pick object(mousex(),mousey(),1,1000)
if ThisObject>0 and Mouseclick()=1 and CL=0 then CL=1
if mouseclick()=0 then CL=0
if CL=1
x#=object position x(ThisObject)+mousemovex()*size#
y#=object position y(ThisObject)
z#=object position z(ThisObject)-mousemovey()*size#
position object ThisObject,x#,y#,z#
ENDIF
set cursor 0,0
print "This Object: ";ThisObject
print "Click Locked? ";CL
LOOP
It seemed as if mouse movement was being registered when there was none. So I added 2 print lines to monitor the mouse movement, and then the jumping stopped!
make object cube 1,1:yrotate object 1,90:move object 1,.5
make object sphere 2,1:yrotate object 2, -90:move object 2,.5
size#=object size(1)/100
do
if CL=0 then ThisObject=pick object(mousex(),mousey(),1,1000)
if ThisObject>0 and Mouseclick()=1 and CL=0 then CL=1
if mouseclick()=0 then CL=0
if CL=1
x#=object position x(ThisObject)+mousemovex()*size#
y#=object position y(ThisObject)
z#=object position z(ThisObject)-mousemovey()*size#
position object ThisObject,x#,y#,z#
ENDIF
set cursor 0,0
print "This Object: ";ThisObject
print "Click Locked? ";CL
print "Mouse Move X: ";MouseMoveX()
print "Mouse Move Y: ";MouseMoveY()
LOOP
Does this make sense?
Does using Mousemove reset/refresh the values or something?