How do I make the object move to where I click on the screen???
maxangleup#=50 : rem maximum angle you can look up
maxangledown#=80 : rem maximum angle you can look down
mousespeed#=3 : rem Speed of mouse(higher=slower)
stepsize#=.5 :rem
Make Matrix 1,100,100,10,10
Position Matrix 1,0,0,0
rem load image "ground.jpg",1
rem prepare matrix texture 1,1,1,1
Position Camera 0,0,0
Make Object Cube 1,3
Color Object 1,RGB(0,230,255)
POSITION OBJECT 1, 1.5, 1.5, 1.5
Do
Position Camera -10,50,-10
Rotate camera 45,45,0
x# = object position x(1)
y# = object position y(1)
z# = object position z(1)
Rem Basic walking code
if upkey()
POSITION OBJECT 1, (x# + stepsize#), y#, (z# + stepsize#)
endif
if downkey()
POSITION OBJECT 1, (x# - stepsize#), y#, (z# - stepsize#)
endif
if rightkey()
POSITION OBJECT 1, (x# + stepsize#), y#, (z# - stepsize#)
endif
if leftkey()
POSITION OBJECT 1, (x# - stepsize#), y#, (z# + stepsize#)
endif
if MOUSECLICK()
mx# = MOUSEX()
my# = MOUSEY()
print mx#,"X", my#
rem ox# = TAN(mx#)* 50
rem oz# = TAN(my#)* -50
ox# = (mx# / 6.4)
oz# = (my# / 4.8)
position object 1,ox#,y#,oz#
endif
SET Cursor 0,0
print mx#,"X", my#
SET Cursor 0,20
print ox#,"X", oz#
sync
loop
Wait Key