The restrict position ability will restrict the character to a specified bounds. When the character hits the edge of that bounds they will stop similar to if they hit a wall.
- Select the + button in the ability list under the “Abilities” foldout of the Ultimate Character Locomotion component.
- Add the Restrict Position ability. This ability can run concurrently with other abilities so the location within the list does not matter.
- Select the type of restriction that you’d like to apply. The min/max position fields can then be adjusted based upon this restriction type.
Specifies how to restrict the character’s position:
- RestrictX: Restricts the local X position.
- RestrictZ: Restricts the local Z position.
- RestrictXZ: Restricts the local X and Z position.
Min/Max X Position
Specifies the minimum and maximum local X position that the character can move to if restricting the X position.
Min/Max Z Position
Specifies the minimum and maximum local Y position that the character can move to if restricting the Y position.