Search Issue Tracker
Fixed in 4.5.X
Votes
8
Found in
4.3.0f4
Issue ID
575758
Regression
No
OnTriggerStay2D is called not properly
To reproduce:
1. Open the attached project
2. Run the "scene1"
3. Move Jane object using arrow keys so that it collides with a "Trappe"object
4. Notice that messages logged from OnTriggerStay2D are logged randomly: sometimes it logs several messages and then stops, sometimes it doesn't log any messages.
Link to the forum thread on the same issue:
http://answers.unity3d.com/questions/575438/how-to-make-ontriggerenter2d-work.html#comment-578072
Comments (10)
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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
scabnog
Dec 19, 2014 20:52
Additional note - I am running Unity 4.5.5f1 so if others have confirmed the fix, then it may simply be an additional problem. I'll open a new issue.
scabnog
Dec 19, 2014 20:47
I have a similar problem - OnTriggerStay2D doesn't get called reliably, making the function unusable. It does not seem related to the collider type (have tried circle, box etc.). The Rigidbody2D is kinematic. This seems to be happening for newly Instantiated objects that are instantiated inside a trigger volume (BoxCollider2D). Perhaps it's related to detecting the trigger entry because it will either work every frame after instantiation or not at all.
scabnog
Dec 19, 2014 20:47
I have a similar problem - OnTriggerStay2D doesn't get called reliably, making the function unusable. It does not seem related to the collider type (have tried circle, box etc.). The Rigidbody2D is kinematic. This seems to be happening for newly Instantiated objects that are instantiated inside a trigger volume (BoxCollider2D). Perhaps it's related to detecting the trigger entry because it will either work every frame after instantiation or not at all.
Xevoius
Apr 30, 2014 13:54
I just bought pro a month ago and have been building my 2D game thinking fixes like this are going to be rolled out ASAP since they are game breakers for the 2D system. Not sure if I need to just port all the physics stuff to the reliable 3D system or wait for the fixes to come down the pipe.
Some sort of timeline would be much appreciated.
diegzumillo
Dec 08, 2013 19:20
I'm putting all my votes on this bug, but the ontriggerenter2d is also problematic. Basically, ontriggerenter is being called every frame and this is being called erratically (usually never).
It is the first release of the physics 2d, after all :) These are 'shirley' going to be fixed in the upcoming updates.
noob101
Nov 29, 2013 10:49
if this is duplicate , can you (Unity) move the votes to the other bug ?!! also can you reference what is it duplicated with ?
mousse
Nov 24, 2013 02:18
the main issue is that kinematic rigidbody2d does not trigger a OnTriggerEnter2D, like it says in the linked forum thread