it would be much appreciated if someone could help me with the mouse control (on my android phone), as i can use an additional to the mouselook script to rotate on X axis, but messes up when i turn on the y axis. i’ve spent quite a few hours trying todo this what i thought would simple…but i’m finding this the most simple thing hard todo…many thanks
show us some code then…
this code seems to work on the x axes fine when used with the standard mouselook code, if used on it’s own it seems to work between the x, y…thanks for taking a look.
var speed : float = 1;
function Update () {
if (Input.touchCount > 0
Input.GetTouch(0).phase == TouchPhase.Moved) {
// Get movement of the finger since last frame
var touchDeltaPosition:Vector3 = Input.GetTouch(0).deltaPosition;
// Move object across XY plane
transform.Rotate (touchDeltaPosition.y * speed,
touchDeltaPosition.y * speed, 0);
transform.Rotate (touchDeltaPosition.x * speed,
touchDeltaPosition.x * speed, 0);
}
}
all sorted thank you…