- Home /
A ball drops down, how to reverse the velocity?
A ball drops down how do i go about reversing the velocity to make the ball go back?
Answer by StephanK · Oct 29, 2010 at 06:52 AM
First you'll have to detect if it's hitting the ground. You can use OnTriggerEnter for that. If the ground is parallel to the x-axis you'd just need to reverse the y component of your velocity. If you need a more general approach you can use Vector3.Reflect.
Answer by Meltdown · Feb 08, 2011 at 02:57 PM
You can also try adding a rigidbody with gravity to your ball, and giving it 'bouncy' physics properties so it would bounce naturally.
Your answer
Follow this Question
Related Questions
how to intercept a rolling ball/object by a player? 0 Answers
Change bouncing angle with touching speed 1 Answer
How to Instantiate and change velocity 2 Answers
How to reduce bounce? 1 Answer