Mouse angles ***

Blitz3D Forums/Blitz3D Programming/Mouse angles ***

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Hmmm, i don't know where i'm going wrong here :(
can you help me please?
Heres my code:


Graphics 640,480
SetBuffer BackBuffer()



Type ball

Field x#
Field y#
Field vx#
Field vy#

End Type




b.ball=New ball
b\x=300
b\y=300





While Not KeyHit(1)
ClsColor 0,30,0
Cls
a=ATan2(MouseX()-b\x, MouseY()-b\y)

Line b\x,b\y,Cos(a),Sin(a)
Oval b\x,b\y,10,10,True

Flip

Wend



Thanks jfk

BLUE :)