Magnetic Power Up
I am trying to code a magnetic behaviour for the paddle in my breakout game. I need the code to: - allow the paddle to attract the ball - mantain the speed of the ball constant - allow the ball to hit the paddle and bounce away - the paddle should attract the ball only if the ball is approaching the paddle
Any suggestion will be much appreciated!
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613021121im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to check if transform.position reaches target.position? 2 Answers
How to Stack, Shuffle and deal cards 0 Answers
Need help, the speed stacks if I press left/up, right/up, left/down or right/down. 1 Answer
how is the Input.compass.rawVector affected by a magnet? 0 Answers
Realistic ball left-right movement 0 Answers