To appease the code gods who preside over us (I mean above Lee) , here is an object placement/rotator/resizer cursor snippet for the newer programmers here. Easily implemented into any code. (May need tweaking or put into functions instead of subs) Hey, I try.
gosub setup
set point light 0,0,10,0
move camera -1
do
Gosub GetAxis
ThisX#=object position x(ThisObject):ThisY#=object position y(ThisObject):ThisZ#=object position z(ThisObject)
if mouseclick()=1
if axis=2 and xFlip=1 then position object Cursor,ox#+((mousex()-Mx)*.01),oy#,oz#
if axis=2 and xFlip=-1 then position object Cursor,ox#-((mousex()-Mx)*.01),oy#,oz#
if axis=3 then position object Cursor,ox#,oy#-((mousey()-My)*.01),oz#
if axis=4 and zFlip=1 then position object Cursor,ox#,oy#,oz#+((mousex()-Mx)*.01)
if axis=4 and zFlip=-1 then position object Cursor,ox#,oy#,oz#-((mousex()-Mx)*.01)
ENDIF
if mouseclick()<>2 then ScaleHold=0
if mouseclick()=2
lx#=limb scale x(ThisObject,0)
ly#=limb scale y(ThisObject,0)
lz#=limb scale z(ThisObject,0)
mmx=mousemovex():if ScaleHold=0 then mmx=mousemovex()
mmy=mousemovey():if ScaleHold=0 then mmy=mousemovey()
if axis=2 and xFlip=1 then scale limb ThisObject,0,Lx#+(mmx*.5),Ly#,Lz#
if axis=2 and xFlip=-1 then scale limb ThisObject,0,Lx#-(mmx*.5),Ly#,Lz#
if axis=3 then scale limb ThisObject,0,Lx#,Ly#-(mmy*.5),Lz#
if axis=4 and zFlip=1 then scale limb ThisObject,0,Lx#,Ly#,Lz#+(mmx*.5)
if axis=4 and zFlip=-1 then scale limb ThisObject,0,Lx#,Ly#,Lz#-(mmx*.5)
ScaleHold=1
ENDIF
if mouseclick()=4
if axis=2 then rotate limb ThisObject,0,wrapvalue(ax#-(((mousey()-My)*.1)))*xFlip,limb angle y(ThisObject,0),limb angle z(ThisObject,0)
if axis=3 then rotate limb ThisObject,0,ax#,wrapvalue(ay#-(((mousex()-Mx)*.1))),az#
if axis=4 then rotate limb ThisObject,0,limb angle x(ThisObject,0),limb angle y(ThisObject,0),wrapvalue(az#-(((mousey()-My)*.1)))*zFlip
ENDIF
if axis>0
position object ThisObject,object position x(Cursor),object position y(Cursor),object position z(Cursor)
ENDIF
control camera using arrowkeys 0,.1,6
cx#=camera position x():cy#=camera position y():cz#=camera position z()
set cursor 0,0
if mouseclick()=0
center text 90,5,"LEFT CLICK -> MOVE"
center text 90,20,"RIGHT CLICK -> SCALE"
center text 90,35,"CENTER CLICK -> ROTATE"
ENDIF
if mouseclick()=1
print "Xpos: ";object position x(ThisObject)
print "Ypos: ";object position y(ThisObject)
print "Zpos: ";object position z(ThisObject)
ENDIF
if mouseclick()=2
print "Xsize: ";limb scale x(ThisObject,0)
print "Ysize: ";limb scale y(ThisObject,0)
print "Zsize: ";limb scale z(ThisObject,0)
ENDIF
if mouseclick()=4
print "Xang: ";limb angle x(ThisObject,0)
print "Yang: ";limb angle y(ThisObject,0)
print "Zang: ";limb angle z(ThisObject,0)
ENDIF
print
if axis>0 then print "Axis: ";Axis-1
center text screen width()/2,5,"[ARROWKEYS = MOVE CAMERA]"
if inkey$()="u" then move camera up .1
if inkey$()="d" then move camera down .1
sync
loop
Setup:
set window layout 0,1,2
sync on:sync rate 25
set camera range .1,1000
`MAKE FLOOR
green=rgb(0,70,0):black=rgb(2,2,2):grey=rgb(55,55,55):white=rgb(200,200,200)
box 0,0,200,200,grey,grey,grey,grey
box 2,2,198,198,black,white,white,black
get image 1,0,0,200,200
make matrix 1,10,10,10,10
prepare matrix texture 1,1,1,1
position matrix 1,-5,-1,-5
ghost matrix on 1,3
update matrix 1
`GET PRIMARY COLOR
Grn=rgb(0,200,0):Red=rgb(200,0,0):Blu=rgb(0,0,200):Yel=rgb(200,200,0)
Lav=rgb(230,140,230)
Red1=801:Grn1=802:Blu1=803:Yel1=804:Lav1=805
box 0,0,10,10,Red,Red,Red,Red:get image Red1,0,0,10,10
box 0,0,10,10,Grn,Grn,Grn,Grn:get image Grn1,0,0,10,10
box 0,0,10,10,Blu,Blu,Blu,Blu:get image Blu1,0,0,10,10
box 0,0,10,10,Yel,Yel,Yel,Yel:get image Yel1,0,0,10,10
box 0,0,10,10,Lav,Lav,Lav,Lav:get image Lav1,0,0,10,10
`MAKE CURSOR
Cursor=1:Pointer=2:Rotator=Pointer+10
make object sphere Cursor,.15
make object cylinder Cursor+1,.1:scale limb Cursor+1,0,40,1000,40:rotate limb Cursor+1,0,90,0,0:`make mesh from object Cursor+1,Cursor+1:`delete object Cursor+1
make object cone Cursor+2,.1:rotate limb Cursor+2,0,90,0,0:make mesh from object Cursor+2,Cursor+2:delete object Cursor+2
add limb Cursor+1,1,Cursor+2:offset limb Cursor+1,1,0,0,.5
make mesh from object Pointer,Cursor+1:delete object Cursor+1
make object Pointer,Pointer,0:yrotate object Pointer,90
make object Pointer+1,Pointer,0:xrotate object Pointer+1,-90
make object Pointer+2,Pointer,0
move object Pointer,.56
move object Pointer+1,.56
move object Pointer+2,.56
glue object to limb Pointer,Cursor,0
glue object to limb Pointer+1,Cursor,0
glue object to limb Pointer+2,Cursor,0
set object cull Cursor,0
disable object zdepth Cursor
disable object zdepth Pointer:texture object Pointer,Red1:set object light Pointer,0
disable object zdepth Pointer+1:texture object Pointer+1,Blu1:set object light Pointer+1,0
disable object zdepth Pointer+2:texture object Pointer+2,Grn1:set object light Pointer+2,0
`MAKE TEST OBJECT
ThisObject=100
make object cube ThisObject,1
texture object 100,1
color backdrop 0
return
GetAxis:
if mouseclick()>0 then mClick=1 else mClick=0
if mClick=0 and axis>0
if axis=2 then texture object 2,Red1
if axis=3 then texture object 3,Blu1
if axis=4 then texture object 4,Grn1
axis=0
ENDIF
if cz#>ThisZ# then xFlip=-1 else xFlip=1
if cx#<ThisX# then zFlip=-1 else zFlip=1
if mClick=1
p=pick object(mousex(),mousey(),Pointer,Pointer+2)
if p>0 and axis=0 then axis=p:texture object p,Yel1:Mx=mousex():My=mousey():ox#=object position x(Cursor):oy#=object position y(Cursor):oz#=object position z(Cursor)
ENDIF
if mouseclick()<>4
ax#=limb angle x(ThisObject,0)
ay#=limb angle y(ThisObject,0)
az#=limb angle z(ThisObject,0)
ENDIF
return