Turning an object into a RigidBody and applying a force on it...

I need the simplest way possible to add a rigidbody to an object upon collision. How can this be achieved?

(please consider that all my work is in c#, although a bit of java doesn’t hurt…)

Thanks in advance!

get the gameObject, then add a rigidbody component (Unity javascript) :

function OnCollisionEnter( other : Collision ) 
    var otherGameObject : GameObject = other.collider.gameObject;
	otherGameObject.AddComponent( Rigidbody );

Edit : D’oh, too slow =]

oncolliision(Collider collider)


mark as answerd