Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm try this script out

and I'm having some issues with it (it seemed to work when I tried it with an old version of unity)

the first issue is of collision, the objects (in my case spheres) will stick into each other rather than just touch.

and the second is that when the objects collide one of the objects with continue it's trajectory.

I'm thinking of rewriting the script from scratch unless someone can explain what's wrong with the script that i've got.

Just two spheres

share|improve this question
Might be the Rigidbody Kinematic and Mass setting in you've got set, the continued trajectory sounds like the mass of the object is 0. – Caius Eugene Dec 20 '12 at 10:29
I have kinematic off, and the default gravity off too. but the force upon collision carries on and isn't lost. – Joseph Le Brech Dec 20 '12 at 10:35
In that screenshot gravity is set to 0, that'll be why. – Caius Eugene Dec 24 '12 at 22:40
no gravity has to be set to 0 for the script to work, that gravity is the inbuilt gravity setting of unity, all the planets will fall to the ground and that's not what i'm looking for. – Joseph Le Brech Dec 26 '12 at 10:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.