I'd like to make a building that can be built over normal buildings and will block the movement of flying units, like normal buildings do for ground units. Is there A way?
The basic problem you're going to face is that collision for flying units is hardcoded to be soft (as opposed to hard collision for ground units.) I am not sure if anyone has or will be able to figure out a way to make flying units use hard collision.
However workarounds are possible. A very simple one is a behavior that periodically searches the area around the building for flying units and applies a positive force to them. That'll essentially push them away from the building, although it still won't give them hard collision and I don't believe they will pathfind around the obstacle which is kind of a deal killer.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
The basic problem you're going to face is that collision for flying units is hardcoded to be soft (as opposed to hard collision for ground units.) I am not sure if anyone has or will be able to figure out a way to make flying units use hard collision.
However workarounds are possible. A very simple one is a behavior that periodically searches the area around the building for flying units and applies a positive force to them. That'll essentially push them away from the building, although it still won't give them hard collision and I don't believe they will pathfind around the obstacle which is kind of a deal killer.