void FixedUpdate()
{
Quaternion x = Quaternion.AngleAxis(xRot, transform.right);
xRot = xRot + -Input.GetAxis("Vertical") * speed * Time.deltaTime;
xRot = Mathf.Repeat(xRot, 360);
Quaternion y = Quaternion.AngleAxis(yRot, transform.up);
yRot = yRot + Input.GetAxis("Horizontal") * speed * Time.deltaTime;
yRot = Mathf.Repeat(yRot, 360);
transform.rotation = x * y;
}
Doing following code, the object will spin out of control… if I only use 1 axis, it will go as normal
what I should do ?