⛷️Slide
Overview
The Slide State allows the character to slide on a slippery surface. Its State ID is 9.
It does not require RootMotion Animations. It only requires slide animations.

How it works
The character will detect the ground underneath and it will search for a Ground Speed Changer Component attached to the ground. If the Ground Changer has enabled the Slide option. the State will be activated.

Creating the State
To create a new Slide, click the Plus[+] button on the States list.

Or duplicate any of the already created Slide States Assets of any animal you own and drag it to the States List.
Priority
The state should have a higher priority than Idle, Locomotion, and but below Fall since the animal can fall anytime if there's no more ground beneath it.

When the animal is in this state, all the Lower priority states are ignored until the exit conditions for this state are fulfilled, or a higher priority state has valid activation conditions.
Requirements
The Slide state requires a ground with the SpeedGround Changer component attached to work, with the Slide option set to true.
It also requires a new set of sliding animations.

Activation
This state is an automatic state, meaning it will be checked for the conditions given by the Ground Changer to be activated. If the Current Slope angle is greater than the Ground Changer Min Slope Angle then the state will be activated. See GroundChanger conditions for more details
The state can also be automatically activated if the Slope Option is enabled.
By Input
The State does not need an input to be activated. Only a Ground Speed Changer component
By Zones
The State does not need a zone to be activated. Only a Ground Speed Changer component
Animal Reaction
Animal Reactions can be used to activate or force-activate the state. Check Reactions
Public Method
To activate the Jump State via script call the method:
Animal.State_Activate(9)
or Animal.State_Activate(StateEnum.Slide)
Exit Conditions
Through code, the exit conditions will be executed to check if the State can exit. In the case of this state, the conditions are:
There's no more ground with a Ground Speed Changer beneath the character
A State with greater priority values is Activated
The current Angle Slope of the terrain is lower than the Min Angle Slope of the Ground Speed Changer
Speeds
How fast the Slide will be done is due to the Speed Set Modifiers.

Animator
The Slidestate requires the Animation States in charge of the Slide Logic


Core Animation
All States have a core animation, on which the animal will stay while the state is active. In the case of Slide will be the Slide Animation State.
⚠️This core animation must be always tagged just like the Name of the State ID.

You can create a 1DBlend tree to have better animations for the sliding. Use the Horizontal value.

Exit Transitions
(Newer Version of AC does not require exit transitions on the States)
Slide Parameters

Orient Lerp
Lerp value for the Alignment to the surface
Min Slope Angle
If the current Slope of the character is greater than this value, the state can be activated.
If the current Slope of the character is lower than this value. The state will exit.
Ignore Rotation
The rotation of the character while sliding will be ignored. This value is overridden by the Ground Slide Data. (This value will be used when AutoSlope is true)

Rotation Angle
When Sliding the Animal will be able to orient toward the direction of this given angle

Side Movement
When Sliding the Animal will be able to move horizontally with this value. This value will be modified by the Ground Speed Changer Data.
Exit Conditions (Speed)
If the Speed is lower than this value the Slide state will end, even when we are still on a Slide Ground
Exit Conditions (Angle Slope)
If the Slope of the Slide ground is greater than this value, the Slide State will exit. Even when we are still on a Slide Ground
Exit Conditions (Wait time)
When a Flat terrain is reached. it will wait this time to transition to Locomotion or Idle.

Auto Slope (No Ground Changer)
Activate the Sliding state if the character is on a slope
(It allows to activate the state without the Speed Ground Changer Component)

Enter Angle Slope
If the Slope of the Slide ground is greater than this value, the Slide State be Activated. Zero value will ignore Enter by Slope
Facing Angle Slope
Enter the Slide state if the Character is facing the slope.. Default value 90
Last updated
Was this helpful?