I'm trying to create something where the aim is for the player to hit a ball-object.
It's first person so there will be a bat object visible, when the player clicks I want to test if there is a ball-object near and if so, apply a force to the ball in a negative direction.
How do I go about doing this?
asked Aug 01 '10 at 05:24 AM
To completely reverse an object's velocity, just do this:
That will make it reverse mid-air. After that, you could apply variance to the vector, or use rigidbody.AddForce to make the ball move in a slightly different direction (akin to baseball).
answered Aug 01 '10 at 07:28 AM