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

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

  3. mousehandjason

    Feb 12, 2014 14:35

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

  4. AndreiKubyshkin

    Feb 03, 2014 18:23

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

  5. 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!

  6. racura

    Jan 30, 2014 08:35

    This is a bug

  7. Tterraj42

    Jan 27, 2014 20:01

    I, too, would like this changed.

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

  9. MelvMay

    Jan 17, 2014 15:05

    Isn't the title incorrect? It should say Kinematic colliders don't interact with static colliders. By not adding a rigid-body to "the other cube" it is static. That is "by design" because this is what Box2D imposes. Kinematic only interact with Dynamic.

    Regardless, I have recently implemented a change internal to Box2D to allow Kinematic bodies to interact with Static bodies.

  10. KaKaGo

    Jan 17, 2014 09:12

    Different from 3D.
    Document do not tell the difference.
    Bad Design.

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.