Rotate a vector. How to?

I want to do 3 traces, 2 of which are offset +/- 12 degrees from the first trace. The code below works but is very poorly written since I’m sure there is just some vector math I can do to accomplish the same thing. Any ideas?

local pos = self.Owner:GetShootPos()
local dir = self.Owner:GetAimVector()

local ang = dir:Angle()
ang:RotateAroundAxis( self.Owner:GetUp(), 12 )
local rotatedDir = ang:Forward()
return (pos + (rotatedDir * 150))
[/lua] Is this what you need?

I’m currently using that but I’m sure there is a better way. With that i have to convert to and angle then back to a vector.

A vector has magnitude ( length ) and a normal ( direction ). To rotate this, you need to first convert to a normalized vector, then rotate along an axis.

There’s Vector:Rotate( angle ) which rotates each axis of the vector based on said angle, but it really is doing the same thing.

So, no, there really isn’t any better way that I am aware of currently.