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
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)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Opening Terrain Prefab in Prefab Editing Mode throws "NullReferenceException" error
- [Search] Dragging query pills put them behind the search text field
- A CustomPropertyDrawer that returns a PropertyField for a property named the same as a child field will not render all child fields
- Graphics Settings shows default values instead of the real values in the Rendering Debugger when Volume.profile is assigned via script
- Deleting multiple Tags throws “NullReferenceException”, and "Retrieving array element that was out of bounds" errors when holding the Enter key
SpaceMidget75
Jan 15, 2014 13:28
Agree this shouldn't be by design unless Unity can explain why it behaves differently to the 3D behaviour.
PiecesOfLogic
Jan 11, 2014 19:46
I posted this in feedback: http://feedback.unity3d.com/suggestions/2d-kinematic-rigidbodies-must-cause-ontrigger-events
Agreed. This is a huge design flaw that needs to be fixed ASAP.
JonBPS
Jan 10, 2014 10:57
This should be fixed, no idea why this is By Design.
The inconstancy between 2D physics and 3D physics is bad.
jellybit
Dec 25, 2013 05:07
Very confused as to why this is by design. Just try to make a few 2D games and this design choice seems more and more mind-bendingly ridiculous.
GustavoCarvalho
Dec 21, 2013 19:53
Agreed. Make perfect sense kinematics (like a moving platform) to trigger colliders.
littlepolygon
Dec 17, 2013 02:51
@TAK "Kinematic can collide with kinematic. " - this is inaccurate.
littlepolygon
Dec 17, 2013 02:46
By Design = Bad Design!
Kinematic bodies are extremely common for character control. Without triggers, that whole paradigm is bricked.
Tak
Dec 10, 2013 16:41
More information:
"In Box2D kinematic bodies only collide with other kinematic bodies, therefore the second static body doesn't create a contact.
When you change the first body to be dynamic (un-check the IsKinematic property), then it's a dynamic body. Dynamic bodies do collide with static bodies.
Kinematic can collide with kinematic.
Dynamic can collide with static and dynamic.
Static can collide with dynamic.
Box2D imposes this and not Unity."
Bamboy
Dec 08, 2013 16:30
I just spent around 10 hours making something that was relying on OnTriggerEnter2D to function properly. Please fix this ASAP. (+10 votes)
Tortuap
Dec 07, 2013 23:56
Agree too. Is it by design because they miss the feature and now they fear about developers complaining about the change ? We wont complain about a change if it helps things to be iso between 2D / 3D and if it makes things easier. Why would I put a rigid body and hacking it to disable the physics for getting collision detection to work ?