Basically, I want to take a Vector3 direction and rotate it x Degrees and get back a Vector3 direction?
For Example
Vector3.forward = 0,0,1
If I want to rotate to the left 45 degrees, the final Vector3 is (-1, 0, 1)
If I want to rotate to the left 90 degrees, the final Vector3 is (-1, 0, 0)
Previously, I have been using the method: Quaternion.AngleAxis, but is there a better way using Vector3 math or logic to achieve the same thing?
For Example:
Vector3 currentDirection = Vector3.forward;
// if I want to rotate left by 45 degrees, I have been using this method
Vector3 newDirection = Quaternion.AngleAxis ( -45f, Vector3.up) * currentDirection;