- Home /
Using a touch event for character motor
I would like to use the character motor for its jumping feature but I cannot figure out how to remap the input in order to use a swipe event. I use a plugin call Input.Touches for touch events, so I am not sure how I would implement in a similar form to Input.GetButtonDown("") etc.
 motor.inputJump = Input.GetButton("Jump");
and then my touch event :
 function OnEnable () {
 
 Gesture.onSwipingEndE += UpSwipe;
 
 }
 
 function OnDisable () {
 
 Gesture.onSwipeEndE -= UpSwipe;
 
 }
 
 function UpSwipe (sw : SwipeInfo) {
 
 if (sw.angle >= 70 && sw.angle <= 100) {
  
  //?
 
 }
 
 
 }
Any help would be very much appreciated! Thank you!
Answers in c# or javascript are ok, just working in javascript because that is what the charactermotor script is in.
               Comment
              
 
               
              Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                