Search Issue Tracker
Fixed
Votes
4
Found in
4.3.0f1
Issue ID
573682
Regression
No
OnTriggerEnter2D called too many times
To reproduce:
1. Open the "Unity Projects 02: 2D Platformer v2.1" from the Asset Store
2. Open the scene called "Level"
3. Attach a script with "void OnTriggerEnter2D() { Debug.Log("enter"); }" to "hero"
4. Run the scene
5. Notice how "enter" is logged many times when player gets thrown to the river by zombies (dies)
Comments (24)
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
- "New" Label overlaps long Asset names in Import Unity Package Window
- Rotation values flip in animation when importing FBX with a generic rig
- [Quality Hackweek] Activated Terrain Inspector is active only until the terrain GameObject is deselected when two or more Inspectors are open
- Physics Used Memory keeps growing when GameObject colliders are enabled and disabled
- Errors are thrown and Inspector's UI element is not drawing when a GameObject with script component using a List<T> attached is selected
GarthWood
Jan 25, 2014 13:24
I guess I should read the comments properly first :P
GarthWood
Jan 25, 2014 13:21
Still happening in 4.3.3f1 when manually setting the position of the transform. It works fine when using AddForce(). This needs to be fixed. It's the foundation of 2D triggering using manual position updates.
MelvMay
Jan 23, 2014 11:15
This has been fixed is not in the 4.3 release but has indeed been fixed for a future release.
The relationship with the Animator component is that there was also a bug in that component which caused other components to update their transform position (even if you were not animating it). In the case of the 2D physics, this caused a RB update which then caused a re-evaluation of contacts resulting in a new "Enter" callback.
Two things have been fixed. The first is the problem in the Animator component and the second is that the 2D physics now keeps the Enter/Stay/Exit callback state even if Box2D re-evaluates contacts.
Unfortunately, this fix missed the deadline for any 4.3 fixes of this severity and will be in a future release.
KaKaGo
Jan 17, 2014 09:05
still in 4.3.3f1.
OnCollisionEnter2D has the same bug on concave Polygon2D
Fazel
Jan 13, 2014 17:34
I got the same bug. And the Stay event is bugged too in 4.3.0f4
Pat-AfterMoon
Jan 11, 2014 17:27
This Bug is really still present in 4.3.1f1, please, remove this "fixed" status!
If you take the "Unity Projects 02: 2D Platformer v2.1" as an example, It seems to be related to the Animator component, because if you deactivate this component, this bug doesn't occurs anymore.
Andrige_
Dec 16, 2013 01:15
Bug still present in 4.3.1f1.
diegzumillo
Dec 08, 2013 19:24
I'm still on the 4.3.0f4 and this bug is still there.
Tortuap
Dec 08, 2013 00:06
Still in the 4.3.1f1
AndreiKubyshkin
Nov 24, 2013 07:13
Maybe your trigger object is moving? When trigger is moving and there's no rigidbody2d component on trigger object, it behaves strange, shooting OnTriggerEnter many times.