I'm trying to use the following script along with the joystick.js script provided by Unity. This script disables the joystick by dominating all touches. Any help appreciated.
var guiSpeedElement : Transform;
private var normalizedSpeed : float = 0.2;
private var euler : Vector3 = Vector3.zero;
function Awake () {
multiTouchEnabled=true;
guiSpeedElement.position = new Vector3 (0, normalizedSpeed, 0);
}
function Update () {
if (Input.touchCount>0){
for (var evt : Touch in Input.touches)
{
if (evt.phase == TouchPhase.Moved)
{
normalizedSpeed = evt.position.y / Screen.height;
guiSpeedElement.position = new Vector3 (0, normalizedSpeed, 0);
}
}
}
}
asked
Oct 29 '10 at 03:46 PM
vertex
105
●
13
●
13
●
15