Hello All, I get a direction from two Vector3, and I would like to get another direction wich is based on this direction but rotated with x degrees. Can somebody help me to get the green direction vector? (example in attachment) Thank you!
This is pretty straightforward. You can multiply a vector with a quaternion in order to rotate it. Always multiply a quaternion with a vector; it doesn't work the other way around. Code (csharp): Quaternion rotation = Quaternion.AngleAxis(degrees,Vector3.up); Vector3 green = rotation*red; I assume you want to rotate it around the y-axis. If you want to rotate it around another axis, use Vector3.forward and Vector3.left for the x and z axes. I don't remember which is which. Also, if you only want to get a vector that's rotated 90 degrees, you can use Vector3.Cross.