Search Unity

Colliders randomly stops working

Discussion in 'Physics' started by RealMTG, May 22, 2016.

  1. JamesLeeNZ

    JamesLeeNZ

    Joined:
    Nov 15, 2011
    Posts:
    5,618
    Ironic that youre using the CC... you aint got nothing on me kid
     
  2. aliceingameland

    aliceingameland

    Unity Technologies

    Joined:
    Apr 18, 2016
    Posts:
    143
    *ahem*

    Thanks to those trying to keep this thread on topic and productive. I don't want to see any further antagonistic behavior in here from anyone.
     
    ModLunar and Harinezumi like this.
  3. JamesLeeNZ

    JamesLeeNZ

    Joined:
    Nov 15, 2011
    Posts:
    5,618
  4. DavidByers

    DavidByers

    Joined:
    Dec 31, 2010
    Posts:
    79
    I just wanted to chime in that I'm running into the same issue. Unity will randomly ignore collisions with a character controller and mesh collider, it feels like it happens every 1000 colliders or so. Collisions will not work at all with a collider that is gliched. I'm running 5.3.5f1 on Windows 10.
     
  5. JamesLeeNZ

    JamesLeeNZ

    Joined:
    Nov 15, 2011
    Posts:
    5,618
    If you want it fixed in a timely fashion, you're going to have to write your own.
     
  6. OneManArmy3D

    OneManArmy3D

    Joined:
    Jun 2, 2011
    Posts:
    108
    unity 5.3.6f1

     
    Harinezumi likes this.
  7. Peris

    Peris

    Joined:
    Aug 8, 2012
    Posts:
    5
    Hey guys, I recorded a video of it happening in my game.
    In this case, one of the wall tiles lost it's collision with the player. The collision still works with everything else, including other character controllers. As you can see in the video, I can run straight through one of the wall tiles:

    http://www.brameulaers.net/debugvid/colliderbug_broken.mp4

    The other wall tiles still have collision. Since they are all instances of the same prefab, there's no reason one of them shouldn't be working. It's definitely an engine side bug.

    After refreshing the scene, the collider works fine, as you can see in this video:

    http://www.brameulaers.net/debugvid/colliderbug_normal.mp4

    It's completely random and impossible to reproduce for me :(. Again, it only started happening in unity 5 for me. I've been working on this project since unity 3 and never had any problem before!
     
    eses likes this.
  8. Peris

    Peris

    Joined:
    Aug 8, 2012
    Posts:
    5
    thank you so much! I'll make sure other people I know suffering from this will help upvote it.

    direct link to the issue tracker: https://issuetracker.unity3d.com/is...ently-ignore-collisions-with-random-colliders
     
  9. DavidByers

    DavidByers

    Joined:
    Dec 31, 2010
    Posts:
    79
    Any news on this???

    This is a major bug, and quite frankly it is completely unacceptable that this is happening in a non beta release. Especially considering this has apparently been happening for months.

    Here's a video of it happening to me, this time in Unity 5.4

     
    Last edited: Feb 5, 2017
  10. JamesLeeNZ

    JamesLeeNZ

    Joined:
    Nov 15, 2011
    Posts:
    5,618
    You still have the option of writing your own so you have full control rather than being at the discretion of the Unity Devs.

    Seems this task is too hard to even consider, even by 'experienced scripters'
     
  11. atmosgames

    atmosgames

    Joined:
    Dec 14, 2011
    Posts:
    70
    Anyone found a fix for this yet?

    Really struggling with this one. It breaks my game. Here's a video of it happening:

     
    Daniel-Strayer likes this.
  12. Daniel-Strayer

    Daniel-Strayer

    Joined:
    Apr 16, 2013
    Posts:
    66
    This is still happening as of Unity 5.4.2f2.
    I had it happen to me the other day with a UFPS controlled CharacterController falling through a box collider. The box collider continues to lack collision detection throughout the current play session, but when restarted, it goes back to normal. In our experience, it is an apparently random collider, and the problem is not at all consistent. We believe that the underlying scene physics management may be excluding a single collider. Possibly something similar to a collection being iterated and excluding a single index due to a mistake in the iteration range. This may be a Unity bug, or possibly a Physx bug.
     
    Last edited: Dec 10, 2016
    atmosgames likes this.
  13. Daniel-Strayer

    Daniel-Strayer

    Joined:
    Apr 16, 2013
    Posts:
    66
  14. Peris

    Peris

    Joined:
    Aug 8, 2012
    Posts:
    5
    Yeah I agree, it's possibly something like this. It seems to always be just a single collider in my scene.
     
  15. rstorm000

    rstorm000

    Joined:
    Aug 19, 2010
    Posts:
    212
    Any update on this?
     
  16. murkantilism

    murkantilism

    Joined:
    Apr 30, 2012
    Posts:
    21
    The only update I could find is that someone posted a video to issue 809914 showing a reproduction in 5.5.

    I'm still investigating to confirm if our problem is in fact a reproduction of this issue, but I believe that my partner is seeing it in-editor on his OSX machine (which is quite curious because the issue ticket says "not reproducible on OSX").The symptoms match very closely to the problems described in this thread.

    We're at 5.5.3 using default CC on a Continuous rigidbody, with custom written movement physics (omnidirectional autorunner).

    Although unconfirmed it's possible that setting our player's RB to Continuous Dynamic may resolve this issue (suggested here). It's also possible that this issue was only exposed when we recently (2ish weeks ago) set a ton of our non-moving gameObjects to Static (also touched on in previous link).

    We have yet to see the issue on iOS, Android, Windows 10, Windows 10 Editor, or OSX. Only seen on OSX Editor thus far.
     
  17. Struts

    Struts

    Joined:
    Jan 12, 2017
    Posts:
    9
    Hello, im very new to unity but i had a similar issue. It was caused by the speed of the moving object, it passed through the collider faster than the fixedupdate timestep. Maby lowering the speed will help!
    Good luck!

    Edit: After reading additional comments its apparent that this is another issue. However i will leave the comment in case it helps someone else.
     
    Last edited: Jan 12, 2017
  18. atmosgames

    atmosgames

    Joined:
    Dec 14, 2011
    Posts:
    70
    Finally got some info from Unity on this:

    "I was successful in reproducing your bug and got some details about it from the developers.

    This is an issue that people tend to run into when using the Character Controller that ships with Unity. Unfortunately, this character controller was written by the folks over at PhysX as an example, and only became a feature addition because it was so widely used. It uses very patchy code that is hard to debug.

    Fortunately, in light of all the complaints received about the CC, we have decided to expose a PhysX method that will go leaps and bounds in aiding users to write their own character controller. It’s the Physics.ComputePenetration method and it will be available from Unity 5.6 going forward. If you’d like to check it out, 5.6 is in Beta right now.
     
  19. rstorm000

    rstorm000

    Joined:
    Aug 19, 2010
    Posts:
    212
    Are there any character controllers in the asset store that are as simple and functional if we are going to go replacing?
     
  20. freeman08

    freeman08

    Joined:
    Sep 3, 2012
    Posts:
    7
    I'd be interested as well, are there any simple and functional character controllers available on the asset store?
    I'm currently using the Unity default CC for my First Person Game and experience the same issues, although very rarely. Unfortunately I lack the skills to write my own.
     
  21. yant

    yant

    Unity Technologies

    Joined:
    Jul 24, 2013
    Posts:
    304
    Hey everyone on the thread,

    I wanted to let you know that we have worked out a fix for this case finally. It's going to be available to the subscribers of 2017.2 alpha builds in a matter of weeks. We'll be providing back-ports for earlier versions too, once the fix has been given a go in the latest version.

    Anthony
    R&D Physics
     
  22. RealMTG

    RealMTG

    Joined:
    Jul 27, 2013
    Posts:
    239
    Very awesome to hear! Then I don't have to be so scared of using it in the future! :D
     
  23. banyango

    banyango

    Joined:
    Mar 31, 2014
    Posts:
    19
    That's great to hear Yant!
    Is there anyway to get an eta on the fix in 5.5.3? I'm nearing my shipping date, if I could get a fix for this that'd be great!
     
  24. SomeGuy22

    SomeGuy22

    Joined:
    Jun 3, 2011
    Posts:
    507
    I've noticed this issue myself for the like the past several years... I always thought I was just hitting the limit of how many colliders my system could handle. I've had to scale back some things in the past to stay under the "limit". Strange to see that there is actually some sort of solution for it... But this has piqued my interest... Is there actually a limit where the Physics system just stops recognizing collisions? Or will it just bog down the FixedUpdate to try to remain accurate?
     
  25. rstorm000

    rstorm000

    Joined:
    Aug 19, 2010
    Posts:
    212
    This is great thank you. Will it be in 5.6.1? or 5.6.2 I'm guessing.
     
  26. 500_pts

    500_pts

    Joined:
    Sep 29, 2014
    Posts:
    1
    Any updates on this? Or at least a post in the issue tracker? Just curious about ETA of backports. Thanks :)
     
  27. rstorm000

    rstorm000

    Joined:
    Aug 19, 2010
    Posts:
    212
    Also interested, as usual
     
  28. banyango

    banyango

    Joined:
    Mar 31, 2014
    Posts:
    19
    Any updates on this?
     
  29. yant

    yant

    Unity Technologies

    Joined:
    Jul 24, 2013
    Posts:
    304
    ModLunar likes this.
  30. Scarletor

    Scarletor

    Joined:
    Sep 24, 2016
    Posts:
    4
    its about 4 years and this bug still occur....
    why ?
     
  31. OneManArmy3D

    OneManArmy3D

    Joined:
    Jun 2, 2011
    Posts:
    108
    I am pretty sure that bug is fixed. At least in unity 2018 everything is fine.
    What version of unity you are using?
     
  32. ChazBarros

    ChazBarros

    Joined:
    Oct 25, 2016
    Posts:
    4
    It's still happening in Unity 2018.4.0f1. It's not that common anymore, but some of our players reported this issue and we were able to reproduce. Unfortunately, it's pretty random so it's hard to submit a test case.
    The best fix that we found is to write your own character controller. There are also several really good character controllers in the asset store.
    Anyway, would be great to have the character controller fixed. Many developers use this component since it's shipped with Unity.
     
  33. yant

    yant

    Unity Technologies

    Joined:
    Jul 24, 2013
    Posts:
    304
    Honestly, authoring a game-specific character controller isn't that bad of a thing, as it gives flexibility alongside deep understanding of how things work under the hood. That's what I used to do in my gamedev years too. Now, it's clear a fix for the issue you described would massively help, and I'll check options with our QAs -- maybe some similar reports could be found in our bug database. As I have your attention -- please feel free to submit a repro if you have it at some point in future, much appreciated. Thanks! anthony
     
    ChazBarros likes this.
  34. goel_sam123

    goel_sam123

    Joined:
    Jan 18, 2017
    Posts:
    2
    I am building a 2D game in unity engine 2019. I have a box collider 2d attached to my player which also has a rigid body attached to it . I have a ground layer setup which too has a box collider 2d attached. The collisions between the player and the ground are inconsistent. Sometimes the player collides with the ground ,sometimes it doesn't . Even at low velocities the player escapes the collider and collision doesn't occur. The collider is fairly narrow (of negligible width) but I don't think that might be the reason behind this. Please Help?
     
  35. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    1,964
    This isn’t related to this thread so I would ask that in the future you create a new one and not hijack an existing one. Anyway, what you describe just sounds like collision tunnelling which can be an artifact of too high a speed and/or too small a collider when using discrete collision detection on a rigidbody. You can use larger colliders, slower speeds or use the slower continuous collision detection on the rigidbody. Tunnelling can also be caused by you incorrectly moving the rigidbody via a transform.

    If you continue to have problems after looking at the above info then please post a new thread, thanks.
     
    gilbertoPlayX and yant like this.