Hey - I have an object that I rotate around its X and Y axis by using
transform.Rotate(x,y,0.0F);
which works fine. By doing this rotation the Transform also gets some z rotation which is also fine. What I want to though is then have the object’s x and z axis return back to 0 while maintaining it’s Y axis. So basically the tilt and roll come back to a neutral state while the yaw remains. If I run something like:
transform.rotation=Quaternion.Lerp(transform.rotation,Quaternion.identity,Time.deltaTime);
it (obviously) returns all three axis back to 0 - what’s the best way for me set a target to interpolate to that’ll keep the yaw?
Any help appreciated.