Search Unity

Objects with disabled colliders are still bumped into

Discussion in 'Navigation' started by PascalTheDog, Nov 12, 2016.

  1. PascalTheDog

    PascalTheDog

    Joined:
    Mar 16, 2015
    Posts:
    86
    Hey,

    So I've got this project with people moving around a top-down view town and entering buildings according to the time of the day. Aesthetically speaking it's very minimalist, similar to what a city plan looks like. So you basically have a map with blue dots moving around, walking to their destination.

    Upon reaching their destination, the dots-characters fade out and disappear from view. However, I still need them to stick around as game objects, due to how the scripts dictating their movements work. Basically, they'll end up going out at a specific time and setting for a new destination, so I can't really have them destroyed.

    I assumed disabling their collider upon reach would do the trick. After all, if they're not visible and nothing can collide with them, it's pretty much like they weren't there.

    The thing is, this doesn't seem to alter the behavior of other dots-characters. They still "bump" into the invisible-colliderless people, and of course I end up with chaotic congestions that also cause most dots-characters to not be able to actually reach their destination since they can't get through.

    How could I solve this problem?

    Thanks.
     
  2. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    Disable the navmesh agent no need to ever have a collider...