- Home /
onCollisionEnter2d not firing properly in unity 4.6 but working fine in unity 4.3
My Character which has Circle Collider 2D & Rigidbody 2D is driven by custom script (Character moves to last mouse down position using Vector3.Lerp). now I have collectibles lets say coins, which have Circle Collider 2D.
When Character collide with coin, onCollisionEnter2d should trigger & destroy coin, this is what happens in unity 4.3.1f1. With unity 4.6.0b17 onCollisionEnter2d is not triggering thus not destroying coin, and at the same time character and coin are colliding perfectly fine they are not intersecting.
code on Character
void Update ()
{
if(this.transform.position != targetPosition)
{
this.transform.position = Vector3.Lerp(this.transform.position, targetPosition , speedMulti* Time.deltaTime);
}
}
void OnCollisionEnter2D(Collision2D info)
{
print(info.gameObject.tag);
}
Your answer
Follow this Question
Related Questions
Resources.Load sprite returning null (4.3) 3 Answers
Moving pivot point For a 2d sprite 3 Answers
How Can I Detect Collision For Part of a Sprite? 1 Answer
Add Local Force with a Rigidbody2D 2 Answers
Unity 4.3 Physics 2d Change Axis 1 Answer