There are two types of sliding implemented in the project: Root-motion Sliding and root-locked sliding. Each one comes with its own benefits. Both however implement True Sliding logic, which means that the capsule size of the character is reduced in order to be able to slide under obstacles.
Sliding Settings
You can change the Sliding settings in the Component under Details Panels
In order to enable sliding, make sure bCanEverSlide is set to true in the Details Panel of the component.
MaxSlopeAngle: If the current floor slope angle is greater than this value, the character will not be able to slide upwards on the slope
bUseRootMotionForSliding: Whether sliding should be done through the root motion of the SlideMainMontage or through physics with a Root-Locked Montage.
bStopSlidingOnFalling: Interrupt sliding when falling during a slide?
Slide Start Montage: Played in order to transition into the slide. Capsule size is normal at this stage.
Slide Main Montage: Played during the slide. In this step, the capsule size is reduced and you can rotate your character even if you are using root-motion sliding.
Slide End Montage: Played afterwards to transition out of the sliding.
SlideRotationRate: How fast does the character rotate during a slide? (yaw == 0 means there will be no rotation)
RootLockedSlideSpeed: Movement speed when sliding with root-locked slide (i.e., bUseRootMotionForSliding is set to false)
RootLockedSlideDistance: Total distance of the slide when using a root-locked slide (i.e., bUseRootMotionForSliding is set to false)
Root-motion Sliding
This type of sliding uses root-motion animations. Choose this mode by setting the bUseRootMotionForSliding value to true in the Details Panel of the component and make sure EnableRootMotion is set to true and ForceRootLock to false in the Slide Main animation.
This allows you to rotate your character during the sliding by setting the SlideRotationRate yaw value (yaw = 0 means no rotation allowed).
Interpolated/Root-locked Sliding
This type of sliding uses root-locked animations and interpolation. Choose this mode by setting the bUseRootMotionForSliding value to false in the Details Panel of the component and make sure bothForceRootLock and EnableRootMotion are set to true in the Slide Main animation.
This type of sliding interpolates the character’s position forward during the SlideMainMontage. You can set the speed and the distance of the slide by modifying the RootLockedSlideSpeed and RootLockedSlideDistance values.
This also allows you to rotate your character during the sliding by setting the SlideRotationRate yaw value (yaw = 0 means no rotation allowed).
The duration of the montage is the result of Time = Distance/Speed