bouncing circle off another circle

Hello,

I am trying to shoot a cricle onto another circle. The first circle has to bounce off the second one, while the second one is standing still. Can someone give me a hint how I can achieve this? In fact it has to be cost efficient due to mobile game programming.

Thank you so far :slight_smile:

Do you mean circle or sphere?

–

Can't you just use the rigidbody component? Calculations will probably be way much more optimize than anything you will come up with. This should make you feel like using the rigidbody component, http://en.wikipedia.org/wiki/Elastic_collision

–

Is the game 2D? or 3D?

–

I make the same question as fafase. Why not use a rigidbody? It does that out of the box.

–

Its supposed to be 2D. And this is the reason why I dont use rigidbody. It has to stay in 2 dimensions, and when using rigidbody, chances are it breaks the third axis. Or is it possible to fix the heightaxis?

–

2 Answers

2

Thanks to the new built-in 2D tools they have Rigidbody2D now.

CircleCollider2D

Just a rigidbody with 1 and 100 mass?