apply Physics / convert to Rigid

Hey Guys,

I want to create a Sphere which behaves like a rigidbody with a Sphere Collider.

example:

function Update()
{
	if(Input.GetButtonDown("Jump"))
	{
		
		var OBullet = GameObject.CreatePrimitive(PrimitiveType.Sphere); [COLOR="darkolivegreen"]//create a new Sphere[/COLOR]
		OBullet.transform.position = transform.position;  [COLOR="darkolivegreen"]//move that new Sphere to desired pos[/COLOR]
		
                [COLOR="darkolivegreen"]//Here is where the trouble starts. How can i add a Rigidbody/Collider to my Sphere ?[/COLOR]

		OBullet.rigidbody.AddRelativeForce (6000,0,0);  [COLOR="darkolivegreen"]//Of course the Console would give out Errors.[/COLOR]
		OBullet.rigidbody.useGravity = true;                                            
	}
}

thx for any Help ! :slight_smile:

OBullet.AddComponent(Rigidbody);

:wink:

Oh, that was easy. Must have overlooked it in the Reference. :sweat_smile:

Thank you :slight_smile: