Hi, i’ve been trying to convert / combine two rotation transforms into one to stop them overriding each other.
//----- tilts character to surfaces -----//
transform.up = Vector3.Lerp(transform.up, surfaceNormal, Time.deltaTime * xRotSpeed);
//----- tilts character to surfaces -----//
//----- tilts left and right ------//
transform.eulerAngles = Vector3(0, curAngle, 0);
//----- tilts left and right ------//
I’m trying to either multiply / scale two together, to allow an X rotation to occur based on the surfaceNormal, or somehow convert the current Vector3.Lerp to allow me to extract a value to put into the X axis of the EulerAngles, as my character only has movement on the x and y (x for turning towards surfaces and y to rotate yaw based on forward velocity)
I hope you can help this hasgot me raging alot lately, tried so many Quaternion types and Vector scales and lerps its driving me nuts!
Thanks!
Renn