I am making a 2D platform games with 3D graphic.
I wan to make my character when stepping the bridge after a few sec the bridge will play the animation and destroy.
function OnTriggerEnter (other : Collider) {
if(other.gameObject.tag=="Player"){
animation.Play ("destroy");
}
But the problem is when my character stepping this bridge it straight fall off.
If I untick the isTrigger, the character can step by but won’t do the animation because it can’t detect the trigger.
I have also try using OnnCollisionEnter by adding a rigidbody to the object
But it won’t work and after stepping the object it move like in a space.
function OnCollisionEnter(collision : Collision) {
if(collision .gameObject.tag=="Player"){
animation.Play ("destroy");
}
Do any of you guys know how I can do this?