2014-03-31

Has a rigidbody2D

mass of 1

collision detection is continuous

box collider2D

isTrigger = yes

circle collider (for smooth world movement)

isTrigger = NO

Using the DestroyerScript done by the programmer in the animation tutorials, I have two different levels set as killvolumes stretching across the screen-wide platform the player runs back and forth across. Still, the player only sometimes trips the kill/restart level event.

Any thoughts? Here's the destroyerScript:

---------------------------------------

using UnityEngine;

using System.Collections;

public class DestroyerScript : MonoBehaviour {

void OnTriggerEnter2D(Collider2D Other)

{

if (Other.tag == "Player")

{

Application.LoadLevel (1);

return;

}

if(Other.gameObject.transform.parent)

{

Destroy (Other.gameObject.transform.parent.gameObject);

}

else

{

Destroy (Other.gameObject);

}

}

}

------------------------------------------------

Show more