Log in or register to post comments

[Q] Convert rotation in world space to rotation in camera space?

December 22, 2013 - 1:50pm #1

Hi,

I am trying to get to the orientation of a framemarker. Think of a framemarker glued onto a steering wheel: if I turn the steering wheel the orientation of the framemarker changes with it. How do I get to this orientation?

I tried:

Vector3 myAngles = steeringWheelMarker.transform.eulerAngles;
Debug.Log(myAngles.z);

But this gives me the orientation of the framemarker as it is in the inspector which is a constant.

Any help greatly appreciated.

 

 

Tom

[Q] Convert rotation in world space to rotation in camera space?

December 22, 2013 - 2:14pm #3

Hi David,

Many thanks for your replies, it seems to work!

So I need the rotation around the y-axis.

 

Regards,

 

 

Tom

[Q] Convert rotation in world space to rotation in camera space?

December 22, 2013 - 1:57pm #2

Try setting your World Center Mode to Camera

Log in or register to post comments