Move the model with the mouse

Blitz3D Forums/Blitz3D Beginners Area/Move the model with the mouse


if mousehit(1) then 

camerapick camera,mousex(),mousey()
if pickedentity()<>0 then 
     positionentity pivot,pickedx(),pickedy(),pickedz()

endif 
endif

pointentity yourentity,pivot
moveentity yourentity,0,0,speed#
positionentity yourentity,entityx(yourentity),terrainy(terrain,entityx(yourentity),0,entityz(yourentity)),entityz(yourentity)
 



I'll let you flesh it out from there.