🔌Mantle Component
Last updated
Last updated
This component is used to climb obstacles. Add it directly to your character:
Mantle High - Motion Warping Asset for climbing high obstcales.
Mantle Low - Motion Warping Asset for climbing low obstacles.
Settings is a Data Asset, which defines the settings for climbing:
Tip: you can create Mantle Settings and Motion Warping Assets by right clicking Create/KINEMATION/Motion Warping/
Layer Maks: defines the collision mask.
Max Height: maximum allowed height. If obstacle's height is greater than this value, climbing won't be performed.
Low Height: required height to use high-climbing asset. If the obstacle height is great than this value, the system will use the Climb High Asset.
Min Height: minimum allowed height. If obstacle's height is less than this value, climbing won't be performed.
Max Distance: max allowed distance between the character and obstacle.
Capsule Radius/Height: parameters for character capsule trace. It will be used to find the obstacle and check if the obstacle's edge has enough space to place the character.
Sphere Edge Check Radius: defines radius for sphere trace, which will be used to find obstales edge.
Max Surface Incline Angle: defines the maximum allowed surface incline angle.
Forward Offset: defines the forward offset from the target point.
To initiate an interaction, make sure to get a reference to the MantleComponent in your code. Then, use the Interact method of the MotionWarping component:
MantleComponent uses 3 stages to deteremine the target obstacle point:
Try to find the obstacle using the Capsule properties and Max Distance.
Try to find the edge by using Sphere Check properties, max and min obstacle height properties.
Check if point has enough space for the character.
If all steps return true, the system will begin interaction.
Usually climbing is about going from A to B, so make sure to have only 1 Warp Phase in your asset: