So i wrote script that moves and rotates my ship,everything works but when moving diagonal its moving faster.Thanks.

```
if(movingUp == true)
{
transform.position = new Vector3(transform.position.x,transform.position.y + speed,transform.position.z);
if(movingLeft == true)
transform.rotation =
if(movingRight == true)
transform.rotation =
if(movingRight == false && movingLeft == false)
transform.rotation = Quaternion.Slerp(transform.rotation,Quaternion.Euler(90,0,0),rotationSpeed*Time.deltaTime);
}
if(movingDown == true)
{
transform.position = new Vector3(transform.position.x,transform.position.y - speed,transform.position.z);
if(movingRight == false && movingLeft == false)
transform.rotation =
if(movingLeft == true)
transform.rotation =
if(movingRight == true)
transform.rotation =
}
if(movingRight == true)
{
transform.position = new Vector3(transform.position.x + speed,transform.position.y ,transform.position.z);
if(movingUp == false && movingDown == false)
transform.rotation =
}
if(movingLeft == true)
{
transform.position = new Vector3(transform.position.x - speed,transform.position.y,transform.position.z);
if(movingUp == false && movingDown == false)
transform.rotation =
}
```