Monday, June 27, 2011

Instantiates prefab when any rigid body enters the trigger


// Instantiates prefab when any rigid body enters the trigger.
// It preserves the prefab's original position and rotation.

var prefab : Transform;

function OnTriggerEnter () {
Instantiate (prefab);
}

No comments:

Post a Comment