Is there a way to do this? Basically I want a trigger with gravity on it, to fall to the ground's rigidbody, then stop. Is this possible? At the moment the trigger just falls through the ground if I leave gravity on it, so I switched it to isKinematic and it semi-works, but obviously doesn't fall to the ground. So if there isn't a way to get a trigger to fall to the ground and stop, is there a way to make an isKinematic object fall to the ground?
So yeah, I just left the object with gravity on and isKinematic to false when it's created, and then I wrote this code, and it works.
function OnTriggerEnter( other : Collider )
{
print('trigger enter');
this.gameObject.rigidbody.isKinematic = true;
print( this.gameObject + ' triggered by ' + other );
/*
if ( other.gameObject.tag == "Player" )
{
Destroy( gameObject );
print( 'Destroyed' );
}
else
{
Debug.Log( 'Cannot be destroyed by this object' );
}
*/
}
I think this one is maybe better