|
Hi 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?
(comments are locked)
|
|
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).
(comments are locked)
|
|
The above didn't work in the script?
(comments are locked)
|
