Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
xhonzi's avatar
xhonzi
Honored Guest
12 years ago

FollowOrientation for Yaw Only?

Is there a way to make FollowOrientation affect Yaw only?

I tried editing the FollowOrientation code to only look at the .y/.yaw values. Results were disasterous- orientation was jittery and only semi-worked when degrees were not near 0/360. Maybe worked from 90 to 270 degrees, sort of.

Original code:
		// Get our initial world orientation of the cameras from the scene (we can grab it from
// the set FollowOrientation object or this OVRCameraController gameObject)
if(FollowOrientation != null)
OrientationOffset = FollowOrientation.rotation;


I tried something like this (don't have it in front of me currently):
		// Get our initial world orientation of the cameras from the scene (we can grab it from
// the set FollowOrientation object or this OVRCameraController gameObject)
if(FollowOrientation != null)
OrientationOffset.Yaw = FollowOrientation.rotation.Yaw;


Is there a good way of doing this?