Collision & Navigation
Generally speaking, our asset artists provide us with the Static Mesh for collision. If they did, all we need to do is set up the navigation for it. If they did not, or you are working with temporary assets, we can also do this ourselves!
Collision
If you have no Static Mesh (SM), open up the Skeletal Mesh (SK). From here, we can generate an SM by clicking on the Make Static Mesh option. If you can’t see this option, open up the window in full screen. Make it and save it in the same folder as your SK. Call it SM_[EntityName]_Collision. So, for example: SM_UrukPit_Collision.
Since we generated the SM ourselves, it has no collision yet. Going this route, we assume you are requiring this for testing or temporary purposes. As such, going for a fast and simple solution will suffice. Open up the SM and go to the Collision tab > Add 18DOP Simplified Collision.
Then go into the Details panel on the top right, go to Collision and make sure the Collision Presets is set to Building.
Navigation
Now we have set up the collision, we need to mark our building for the navigation system. This allows for the collision to be used by UE4’s navigation system to calculate territories where units cannot go. It’ll make unit movement smarter, because they will avoid the collision and go around the building.
In the Details panel, go to the Navigation section. Here, we make sure that Is Dynamic Obstacle is checked, which then allows us to pick NavAreaBuilding as the Area Class. We uncheck Create on Client (NOTE by Solethria about Create on Client: not sure whether that is required and/or good or bad, I’m following the original guide setup).
That’s it, now units will actively walk around your building.