# unit vector?

This topic is 4869 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

i want my cannons in my game to recoil. im going to need the unit vector of their aim to get this. if i have their rotation (angle) how would i get a unit vector? im thinking this: tan(theta) = y / x; i could make x = 1; so tan(theta) = y which would mean the vector for that direction would be < 1, tan(theta) >.... is this a unit vector? if not, how do i find one off just an angle?

##### Share on other sites
cos(theta) = x / h
sin(theta) = y / h

Make h (the hypotenuse) 1 and you have your vector.

##### Share on other sites
oh for the love of christ.

i got an A in college calculus at virginia tech and i couldnt figure that out... wow. brain fart.

*throws away page of vector computations*

thanks.

1. 1
Rutin
38
2. 2
3. 3
4. 4
5. 5

• 11
• 12
• 14
• 9
• 9
• ### Forum Statistics

• Total Topics
633350
• Total Posts
3011467
• ### Who's Online (See full list)

There are no registered users currently online

×