⛷️Slide
Last updated
Was this helpful?
Last updated
Was this helpful?
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.
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.
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.
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.
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.
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.
The State does not need an input to be activated. Only a Ground Speed Changer component
The State does not need a zone to be activated. Only a Ground Speed Changer component
Animal Reactions can be used to activate or force-activate the state. Check Reactions
To activate the Jump State via script call the method:
Animal.State_Activate(9)
or Animal.State_Activate(StateEnum.Slide)
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
How fast the Slide will be done is due to the Speed Set Modifiers.
The Slidestate requires the Animation States in charge of the Slide Logic
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.
The slide animations do not require to be rootmotion animations
(Newer Version of AC does not require exit transitions on the States)
Lerp value for the Alignment to the surface
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.
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)
When Sliding the Animal will be able to orient toward the direction of this given angle
When Sliding the Animal will be able to move horizontally with this value. This value will be modified by the Ground Speed Changer Data.
If the Speed is lower than this value the Slide state will end, even when we are still on a Slide Ground
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
When a Flat terrain is reached. it will wait this time to transition to Locomotion or Idle.
Activate the Sliding state if the character is on a slope
(It allows to activate the state without the Speed Ground Changer Component)
If the Slope of the Slide ground is greater than this value, the Slide State be Activated. Zero value will ignore Enter by Slope
Enter the Slide state if the Character is facing the slope.. Default value 90