Why I have this problem??? I make this script (it’s a test) :
function Update ()
{
if(Input.GetKey(KeyCode.LeftShift))
{
if(Input.GetKeyDown(KeyCode.UpArrow))
{
transform.rotation.x += 90;
}
if(Input.GetKeyDown(KeyCode.DownArrow))
{
transform.rotation.x -= 90;
}
if(Input.GetKeyDown(KeyCode.LeftArrow))
{
transform.rotation.z += 90;
}
if(Input.GetKeyDown(KeyCode.RightArrow))
{
transform.rotation.z -= 90;
}
}
}
When I press Shift + UpArrow (or other Arrow) the script don’t add 90° to the transform rotation but make x-axis 0.(+something), y-axis = 180, z-axis = 180. I attach to the post package with the example. Pls help me it’s important!