[gameprogrammer] Darkbasic: coordinates

Hello all of you.

I need mathematic help.

I want the cube move with the cursor but i dont get right arithmetical operation

run this. Is not viruses.  promess
print "Esta aplicación detecta las coordenadas del mouse"
suspend for key
make object cube 10,10

#oldx=0
#oldy=0
#pi=3.14

position object 10,#ratx,#raty*-1,0

do

#ratx=mousex()+320
#raty=mousey()+240


position object 10,#ratx/10,#raty/10*-1,0




loop
suspend for key
end

Other related posts: