Search Issue Tracker

By Design

Votes

24

Found in

4.3.0f4

Issue ID

575251

Regression

No

Rigidbody2d with kinematic rigidbody will not cause OnTriggerEnter2d

Physics2D

-

To reproduce:
1. Create two 2D cubes with colliders 2d
2. Attach a rigidbody 2D to one of the cubes and make the other cube a trigger
3. Attach a script with OnTiggerEnter2D (and some kind of debug message) to the rigidbody cube
4. Enter play mode and move the cube into the other cube - the debug message should get printed
5. Change the rigidbody 2d to kinematic - the debug message is no longer printed, OnTriggerEnter2d is no longer being called

Explanation: kinematic bodies (specifically colliders attached to those bodies) only collide with dynamic bodies.

The allowed collisions for body types are therefore:
Kinematic can collide with Dynamic
Dynamic can collide with Static, Dynamic & Kinematic
Static can collide with Dynamic

Comments (44)

  1. MacTwiste

    Dec 05, 2013 18:09

    Why is this marked as By Design?

    It's a pretty common case to have kinematic objects activate triggers. LIke a player entering an area to trigger an event, for instance. Do you advise using 3D collision instead or are there plans to fix this?

  2. Andrige_

    Dec 03, 2013 13:11

    Agreed. My projectile system has stopped working due to this bug.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.