Author Topic: Rotating a positional offset based on a vector (solved)  (Read 536 times)

I want to offset a point originating on the player's position based on the direction they are looking, but I don't really know how to achieve it. I did it once, but I can't remember how.

Think of it like this:
@ is the player, ~ is where they are looking. X is the result point.

..~..
.X@..
.....


..X..
..@~.
.....
« Last Edit: April 20, 2013, 07:11:10 AM by Port »

Does it need to be 3d

Does it need to be 3d

To summarize: I need to rotate a player's getEyeVector by -90 or 90 degrees.

Nevermind, talked a bit with McTwist and figured it out.

Rotating by -90 degrees:
vectorCross( vector, "0 0 1" )

Rotating by 90 degrees:
vectorCross( vector, "0 0 -1" )