- Home /
 
2D platformer controller script. How to jump with touch?
Hello everyone.
Im using the old 2D Lerpz platforming tutorial for a game.
I'm making touch controls for Android. But for the life of me I cant figure out which function to call to make the character jump.
Im using GuiTexture with this script attached.
 #pragma strict
 
 var PlatformerController : PlatformerController;
 
 function Start () {
 
 }
 
 function Update() 
 
 {
 
     var count : int = Input.touchCount;
 
     
 
     for(var i: int = 0;i < count; i++)//for multi touch
 
     {
 
         var touch : Touch = Input.GetTouch(i);
 
     
 
         if(guiTexture.HitTest(touch.position) && touch.phase == TouchPhase.Began)
 
         {
 
             PlatformerController.ApplyJumping();
 
         }
 
     }
 
 }
 
               This is the tutorial im using http://www.scribd.com/doc/25835825/2D%E2%80%A9Gameplay%E2%80%A9Tutorial
               Comment
              
 
               
              Your answer
 
             Follow this Question
Related Questions
Script plays only once [Android] 0 Answers
How to properly implement snake style controls for android? 0 Answers
Raycast Touch Android not working JS 2 Answers
Instantiate not working 1 Answer
Touch android iput shootting 3 Answers