- Home /
PinBall Flippers
Im am having trouble figureing out what I must set up to make is so that when my ball hits my flipper it sends it back up toward the top of the board. Any suggestions on how I could accomplish this?
I have now set up the padels so they have a box collider and the ball is using a ridgidbody. But when it collides with the paddle it just rolls of it and to the bottom of the board.
Answer by RetepTrun · Sep 10, 2012 at 11:25 PM
Add another collider with trigger checked as a part of the flipper. Then add a script to it that has something like this. I havent tested this though.
function OnTriggerEnter (other : Collider) {
//add force to anything that comes inside
other.rigidbody.AddForce (Vector3.up * 10);
}
If I was going to use this for another game is there a way to add force in the same direction its going?
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Please Help Convert js to c# 1 Answer
Distribute terrain in zones 3 Answers
Procedural Generation 1 Answer
Space Craft controller. 1 Answer