is it possible to use a rotation on a Vector3?

Hi,

is there a quick way to change a vector3 with a rotation without having a GO? Ive got a Vector3(X,Y,Z) and want modify this Vector with a Rotation(X,Y,Z) as if it were a GO. Or do I need to have a GO, place this at Vector(X,Y,Z), do the rotation and then read the Vector3 values?

You can do this:

Quaternion rotation = Quaternion.Euler(x,y,z);
Vector3 myVector = Vector3.one;
Vector3 rotateVector = rotation * myVector;

It's important that the Quaternion is on the left side of the *.

Yes.

The preferred way is to use Quaternions. Conceptually (mathematically) they are a bit intimidating, but if you treat them as a black box that stores rotations, they are pretty easy.

See the first example in this forum thread to see how easy it is: http://forum.unity3d.com/viewtopic.php?p=303861

Here is a link to the documentation.

wow 12 years later thanks @StephanK