You can multiply a Quaternion with a Vector3. Are you sure you’ve even searched for that, because the Quaternion doesn’t have much methods or operators so it’s hard to belive you’ve missed it.
btw:
To “convert” a Vector3 into a rotation(Quaternion) you can use Quaternion.LookRotation. To get a Vector3 from a rotation just multiply the quaternion with Vector3.forward.
I didn't see the second method just the first...Also I tried it earlier and got an error so I figured it couldn't be done. But... I tried vecquat which gave an error. quat * vec worked. myvec=Vector3(0,0,10); myquat=GameObject.Find("go").transform.rotation; //go is rotated 180 around y axis. newvec=myquatmyvec; Debug.Log(newvec); //output = (0,0,-10);
I didn't see the second method just the first...Also I tried it earlier and got an error so I figured it couldn't be done. But... I tried vecquat which gave an error. quat * vec worked. myvec=Vector3(0,0,10); myquat=GameObject.Find("go").transform.rotation; //go is rotated 180 around y axis. newvec=myquatmyvec; Debug.Log(newvec); //output = (0,0,-10);
– dansav