Hello,
I want the X-Axis Value Range to follow the forward transform of my character.
Meaning when the character rotates, the value range rotates with him.
So basically having a “local” x-axis value range parented to the player.
Is there maybe an easy way to do this?
EDIT:
After going into some complicated math I just figured out a very easy solution:
var rotation = rotateObject.transform.rotation.eulerAngles;
freeLookCamera.m_XAxis.m_MinValue = rotation.y - Mathf.Abs(xAxisDefaultValueRange.x);
freeLookCamera.m_XAxis.m_MaxValue = rotation.y + Mathf.Abs(xAxisDefaultValueRange.y);