Hello…
I want to lock the roatation of x axis in the following simple code:
var rotateJoystick : Joystick;
var cameraPivot : Transform;
var rotationSpeed : Vector2 = Vector2( 50, 25 );
function Update()
{
var camRotation = rotateJoystick.position;
camRotation.x *= rotationSpeed.x;
camRotation.y *= rotationSpeed.y;
camRotation *= Time.deltaTime;
1 cameraPivot.Rotate(0, camRotation.x, 0, Space.World);
2 cameraPivot.Rotate(camRotation.y,0,0);
}
The statement (cameraPivot.Rotate(camRotation.y,0,0) is the statement that I want to lock rotation around?