VBGamer |
|||||||||||||||||||||||||||
RE: getting a move direction for a given angle racasan (1 reply, 0 views) (2000-Jun-29) do you mean this
x = 100 'or what ever the x location of the object
y = 100 'or what ever the x location of the object
course = 45 'the direction to go
speed = 3 'the speed to go
'then
x = (x + Sin(course / 57.3) * speed)
y = (y - Cos(course / 57.3) * speed)
' the 57.3 bit is to covert degrees into radians VB probably has a facility for this
'but I could not be bothered to look sorry
by the way I could not get the down load to work (a missing module?)
|