- Home /
How to make a 2D ball (circle) jump away from any surface it's in contact with, and push objects away.
When a button is pressed, the ball needs to push in every direction at once momentarily, bouncing it away from static objects, and pushing loose objects away from it. If no object is hit, nothing happens.
I have tried various methods of attaching small circle rigidbodies to the inside of the ball then shooting them out (still attached though). Spring joints / distance joints, then increasing distance, but it doesn't work very well.
Am I going about this completely the wrong way? I have looked at code only methods too and they have their own problems. Maybe there's a way to detect objects the the ball is on contact with and apply a force away from collision point, I could tag objects as static / loose, and that would determine if the ball or object gets knocked away. Thankyou for reading.
Your answer
Follow this Question
Related Questions
Sphere Goes Crazy 3 Answers
Jump Pad script? 0 Answers
Others can't jump in my game 0 Answers
How to determine if the player can jump, without using raycasts. (2D) 1 Answer
Bounce value not change in script for 2D object in Unity4.3. 1 Answer