Question

I am making a game in Unity 3d using the new 2D features found in Unity 4.3. I type the function OnCollisionEnter but nothing logs to debug when they collide. Is there something I am missing or should I go about this in a different way. Both objects have a ridgibody and are both continuous collision detection.

function OnCollisionEnter2D(coll: Collision2D) {
    Debug.Log("collision");
}
Was it helpful?

Solution

Here is the collision table from Unity:

Unity Collision Table

And here is the documentation page that that comes from, which has all the definitions for the above table and some additional hints: http://docs.unity3d.com/Documentation/Components/class-BoxCollider.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top