Hello! I’m wondering how to rotate an object but only in the x axis to look towards another object/point. The current way I tried to do it was to use the lookRotation and the slerp method and just clamp the y and z rotation to 0. But the moment I write the code to clamp the y and z values, it starts acting strange. Can I please get some suggestions?
Thanks!
I think if you use lookRotation(new Vector3(otherObject.position.x,transfrom.position.y,transform.position.z))