The Building Placement component handles placing buildings for the player controlled faction.
When you’re creating a new map using the RTS Engine menu, this component is attached to an object called “BuildingsManager”.
- Buildings: A list that holds all the buildings prefabs that the player’s faction can build. If there are buildings that are faction-specific, do not include them in this list. They will be automatically added if they are defined correctly in the Game Manager.
- Building Y Offset: This value will be added to the building’s position on the y axis when it is placed on the map.
- Ground Max Distance: This value represents how far each building needs to be from the ground terrain in order to be placed. This distance is calculated starting from the four bottom corners and the bottom center of the building’s collider on the parent building object.
- Hold And Spawn: If activated, this will allow the player to keep placing the same building over and over while holding the Hold And Spawn Key.
- Can Rotate: Enable to allow the player to rotate buildings when placing them.
- Positive/Negative Rotation Keys: If building rotation on placement is enabled, those two keys represent the keys that the player has to press in order to rotate the building in a positive/negative direction.
- Rotation Speed: If building rotation on placement is enabled, this value is the speed at which buildings will rotated.
- Place Building Audio: Audio clip played when the player places a building.