Question by
RamshaR · Sep 28, 2018 at 10:10 AM ·
controllerpathballswipe
Changing ball direction left/right by swipe on an auto generated path
Hey, looking for some help. I want to move my ball left/right by a touch swipe which is continuously running on an auto generated curvy path. I've tried below code but ball is not moving at all.
position.x = Input.GetAxis ("Horizontal") Time.deltaTime movespeed ; transform.Translate (position.x, 0, 0); position.x = Mathf.Clamp (position.x, -6.0f, 6.0f); transform.position = position;
Comment
Your answer
Follow this Question
Related Questions
Ball Bouncing Game(When I touch on ball) 0 Answers
Two Waypoint connector 0 Answers
Swipe Control for Android , Move left and Right ( vertical ) 1 Answer
Want Slide down to shoot in android script Like Ballz Game 1 Answer
detect rotation direction (clockwise or counterclockwise) from touch drag gesture or swipe. 0 Answers