I have the following problem when I rotate my character in unity with the following function
if (direccion < 0 && izq)
{
transform.rotation = Quaternion.AngleAxis(180, Vector3.up);
izq = false;
der = true;
}
else if (direccion > 0 && der)
{
transform.rotation = Quaternion.AngleAxis(0, Vector3.up);
izq = true;
der = false;
}
But now it turns out that when it turns to the left the character appears cut in half but in the "Game" window since in the "Scene" window it appears normal and the strange thing is that when it returns to its initial position it appears complete, now if my question is.
Why does unity U hate me":? hahahaha I really can't find any more explanation of what happens because if I manually modify the rotation values when I play the game there if it appears complete :"C. So please, if someone who passes by, I really ask you to explain it to me, I'm about to reinstall unity because I don't see any more sense in it because it's not working well. Thank you very much in advance.
PS: I cannot use the function of the SpriteRender flipX for aesthetic reasons (the mouth stays static where it is because it is a separate object).
Check the order and positions of the objects with respect to the camera, when rotating objects in and it is likely that the depth will be affected if the camera is not far enough from the objects, good practice is to put the camera in z-20, scenarios at z0 and elements at levels -1:-19