I’m making a 3rd person game with the controls set up so that:
If the player holds down forward on the left stick (i.e. runs forward) and rotates the camera left/right, he’ll run the way the camera’s facing.
HOWEVER, my problem is that he is also running the way the camera is facing, rotated around the x/z axis too, so he’s turning and facing the sky rather than just running on the x,z plane.
I’m not familiar with matricies, quaternions, or eulr’s, so is there a way I can make my character ONLY rotate around the y axis (so that he only runs on the x,z plane), not all 3?
the code I’m using is: “transform.rotation = cameraParent.transform.rotation;”, I’m just not sure how to split it up so that it only changes the rotation around the y axis since transform.rotation.y only returns a value and can not be set by calling that