hello
excuse me , could i know how to define jumpTouchPad input (game object) directly from script (not from editor) ?
what changes should i apply in this script ?
if you look at speed var , i want to define jumptouchpad input like that
private var canJump = false;
var Speed:float=80;
var jumpTouchPad : Joystick;
function FixedUpdate () {
var touchPad = jumpTouchPad;
if ( !touchPad.IsFingerDown() )
canJump = true;
if ( canJump && touchPad.IsFingerDown() )
{
canJump = true;
rigidbody.AddForce(Vector3.right*(Speed*Time.deltaTime));
}
}
Thanks A lot