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. dnaney1978

    Mar 01, 2014 00:30

    Yes this is still an issue. It should work following the unity collision matrix that is used in the 3d system

  2. Jefreestyles

    Feb 26, 2014 03:31

    Rigidbody2d with kinematic rigidbody will not cause OnTriggerEnter2d: Please re-evaluate. The workaround (attaching 3D parented objects, etc.) should only be a TEMPORARY resolution. Please let us know your plans to permanently resolve. Thanks!

  3. blacksp1der

    Feb 23, 2014 05:31

    Bad Design! We are not using Box2D, we are using Unity Engine. I don't care if Box2D doesn't support it. You should implement it.

  4. HighCo

    Feb 22, 2014 21:40

    @MELVMAY: In which version of Unity have you made those changes? Because in version 4.3.4, Kinematic bodies still can't interact with Static bodies...

  5. mousehandjason

    Feb 12, 2014 14:35

    yes this bug is killing me right now, please fix it ASAP

  6. AndreiKubyshkin

    Feb 03, 2014 18:23

    Can't see why would someone want it to be by design that way. Please fix.

  7. skabbmask

    Jan 30, 2014 14:58

    I work at a small company in Sweden, we try to make a game in Unity4.3, but it wont work with this bug. Fix!

  8. racura

    Jan 30, 2014 08:35

    This is a bug

  9. Tterraj42

    Jan 27, 2014 20:01

    I, too, would like this changed.

  10. CleanCut

    Jan 24, 2014 04:47

    This should not be marked "By Design". The documentation says that 2D and 3D physics behavior is "identical between the two engines". This designation flies in the face of that.

    http://docs.unity3d.com/Documentation/Manual/Physics.html

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.