hello everyone, i am having truble getting an object to rotate in the x axis, it starts to rotate but as soon as it reaches a 90 or -90 (if it goes the other way) it stops, i have checked the inputs, the colliders, ect, and nothing seems to be the cause(well obviouly since im asking you guys). and the y and z axes work perfectly fine
here is the script so pls tell me if you have any idea of what could cause it.
using UnityEngine;
using System.Collections;
public class Spaceship_Control : MonoBehaviour {
public float speed = 0f;
public float acceleration = 0.1f;
public Vector3 rotationRatio;
void Update () {
rotationRatio = new Vector3 (Input.GetAxis("Pitch"), Input.GetAxis("Yaw"), Input.GetAxis("Roll"));
transform.eulerAngles += rotationRatio;
speed = Input.GetAxis("Thrust") * acceleration;
//rigidbody.velocity = new Vector3(0, 0, speed);
speed = Mathf.Clamp(speed, 1, 100);
}
}