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

Physics2D

-

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)

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

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

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

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

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

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

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

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.