rotate vector around local axis

Hello,

I am trying to rotate a vector3 ( new Vector3 (0, 0, dist) ) around 3 axes locally.

-Edit2: see comments below
-Edit:
I think I am very close to it but something goes wrong the axes I think:

Vector3 _vec = new Vector3 (0, 0, dist);
_vec = Quaternion.AngleAxis(_rotYaw.y, Vector3.up) * _vec; 
_vec = Quaternion.AngleAxis(_rotationVec.x, Vector3.right) * _vec; 
_vec = Quaternion.AngleAxis(_rotationVec.z, Vector3.forward) * _vec; 

Here is a pic (the 3d sphere is just there to visualize the rotation, the yellow and green lines are important, the green line is where the vector should point to or whatever how that is called):

alt text

I don’t know where the problem is with your code (not saying there is none), but why not just put all rotations into one quaterion and then multiply it?

Quaternion.Euler(_rotationVec) * _vec

Is this still an issue? I solved a similar problem with the following code:

transform.Rotate(Vector3.up, mouseDelta.x, Space.Self);
transform.Rotate(Camera.main.transform.right, mouseDelta.y, Space.World);

This results in a rotation similar to the prefab preview window in the inspector. Maybe the code above helps.