Selection Bounds
Learn about how custom selection bounds are defined.
Last updated
Learn about how custom selection bounds are defined.
Last updated
You might want bigger or smaller selection bounds than what collider or renderers on the units would allow you. For this there is this interface which is used for defining completely custom and adjustable selection bounds on units.
There are few components already provided by Unit Selection package for easy setup. Pick the one which suits your game needs best. If you do not find one that does, you can implement your own and if you believe a common use case is missing, feel free to drop a feature request on or send us an .
Add ColliderSelectionBounds component to selectable unit and specify which collider it should use for bounds.
Add RendererSelectionBounds component to selectable unit and specify which renderer it should use for bounds.
Add CustomSelectionBounds component to selectable unit and specify the offset and size that will be used to create the custom bounds. Offset is applied to the unit's original transform position, taking into account rotation and uses the specified size to define the bounds.