- Home /
Unity iPhone: AddForce to Object after Touch
Okay so I have asked multiple questions on this topic so sorry for spamming but I don't think I have been explaining this right, so I am creating a new thread which is hopefully much more clear. Anyways, I am creating an app which is a ball juggling game. The ball is pushed down by gravity and what I want is so every time I tap the ball it bounces up. So I need to create a script for the ball so that whenever I touch the ball, force is added.
And to further the clarification - what direction do you want the force added in? Do you mean throw it upwards - because the only impact of a touch (singular - no movement) would surely be into the screen.
The direction should be upward. And preferably in a range of 30 degrees so it doesn't go straight up every time, so it goes up at an angle.
And that angle has nothing to do with the movement of the finger - or do you want it to be relative to the finger position and the center of the ball?
Well that depends on how difficult it would be. I'm not very advanced in iOS but if it is not much harder then I would love to have it relative to the finger position.
Your answer
Follow this Question
Related Questions
iPhone - iPad script solution 1 Answer
I want to have FPS iOS tutorials. 0 Answers
How can I make a thumbstick with this code? HELP 1 Answer
How can I swipe function that lets the player select buttons? 0 Answers
simple TOUCH of a 3D object in iOS 2 Answers