Ok,What i'm trying to do is to rotate an object in Roll(left/right) and Pitch(forward/back) axises like this:
function Update(){
var horizontalRotation = Input.GetAxis("Horizontal") * rotationSpeed;
var verticalRotation= Input.GetAxis("Vertical") * rotationSpeed;
var rotationVector = Vector3(verticalRotation,0,-horizontalRotation);
transform.Rotate(rotationVector * 0.1);
}
what happens is that, when for example the up arrow is pressed first, the left or right arrow does not make any change to the rotation anymore. Basically it only gets the first pressed button and ignores whatever comes after until the first button is released. how to fix this? thanks,