VBGamer |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Maths problem Jack Hoxley (3 replies, 0 views) (2000-Aug-30) hi,
I want to get the vector for every angle in a circle. Lemme explain:
If my character is facing 314 degrees - what do I need to move it by to get it to walk in that direction?
for example - at 0 degrees (up) I'd move [x,y] of [0,-1]
at 90 degrees, [1,0]
at 180 degrees [0,1]
at 270 degrees [-1,0]
I want to run a loop through (for I = 0 to 359) and fill an array with .X and .Y values for this vector... (I'm using a UDT)
Currently it's all going pair shaped. I'm trying to use a method called "unit circle" - where the radius is 1, and the origin is 0,0 and you use Cos() and Sin() to get the coordinate. But this dont work; it makes a weird mess...
Any help available?
Jack,
www.vbexplorer.com/directx4vb/
|