DynamicObstacle script blocks grid cells above its influence

  • August 3, 2018 at 20:04 #23594
    EmanTs
    Participant

    I have a rock placed such that part of it is in a wall as seen here: https://imgur.com/Xf0nfiY
    This is the GameObject with the DynamicObstacle script on it, so you can see how it is set up: https://imgur.com/nVcaCIc
    Its bounds are below the ground, yet it still blocks it. Besides creating specific colliders for each instance of such rocks, What can I do to make this object grid influence more reasonable?

    August 6, 2018 at 09:18 #23599
    Geminior
    Keymaster

    I am afraid dynamic obstacles don’t take height into consideration, they will block the grid regardless of whether they are above, on or below it visually.

    One option is to simply remove it as a dynamic obstacle and make it a static obstacle instead. If the obstacle moves and some point that would of course require an update of the grid in that area (there are examples of dynamic grid updates at run time in the examples project).

    Other than that, you would have to make changes to the dynamic obstacle code to account for its vertical position, which is not trivial.

You must be logged in to reply to this topic.