# Slide

## Overview <a href="#overview" id="overview"></a>

The Slide State allows the character to slide on a slippery surface. Its State [**ID** ](https://malbersanimations.gitbook.io/animal-controller/scriptable-architecture/scriptables/scriptable-ids#states-ids)is **9.**

It does not require RootMotion Animations. It only requires slide animations.

<figure><img src="/files/2s9UqXCSD0vwRrmaRjS1" alt=""><figcaption></figcaption></figure>

## &#x20;How it works

The character will detect the ground underneath and it will search for a [**Ground Speed Changer**](/animal-controller/main-components/speed-ground-changer.md) Component attached to the ground. If the [**Ground Change**](/animal-controller/main-components/speed-ground-changer.md)r has enabled the Slide option. the State will be activated.

<figure><img src="/files/0f3aLL2hBt2H7qndPI96" alt=""><figcaption></figcaption></figure>

## Creating the State <a href="#creating-the-state" id="creating-the-state"></a>

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

<figure><img src="/files/WQIvDuB6JojMhwG1gKyK" alt="" width="477"><figcaption></figcaption></figure>

Or duplicate any of the already created Slide States Assets of any animal you own and drag it to the States List.

## Priority <a href="#priority" id="priority"></a>

The state should have a higher priority than [**Idle**](https://malbersanimations.gitbook.io/animal-controller/main-components/manimal-controller/states/idle), [**Locomotion,** ](https://malbersanimations.gitbook.io/animal-controller/main-components/manimal-controller/states/locomotion)and but below [**Fall** ](/animal-controller/main-components/manimal-controller/states/fall.md)since the animal can fall anytime if there's no more ground beneath it.

<figure><img src="/files/MmK56mqWie1922K4QgSe" alt="" width="468"><figcaption></figcaption></figure>

When the animal is in this state, all the Lower priority states are ignored until the [**exit conditions**](https://malbersanimations.gitbook.io/animal-controller/main-components/manimal-controller/states/jump-basic#exit-condition) for this state are fulfilled, or a higher priority state has valid activation conditions.

## Requirements <a href="#requirements" id="requirements"></a>

The Slide state requires a ground with the[ **SpeedGround Changer** ](/animal-controller/main-components/speed-ground-changer.md)component attached to work, with the Slide option set to **true**.&#x20;

It also requires a new set of sliding animations.

<figure><img src="/files/2IvEGe3jxsb8Aop7Sy9C" alt=""><figcaption></figcaption></figure>

## Activation <a href="#activation" id="activation"></a>

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 <a href="#input" id="input"></a>

The State **does not** need an input to be activated. Only a Ground Speed Changer component&#x20;

### By Zones <a href="#zones" id="zones"></a>

The State **does not** need a zone to be activated. Only a Ground Speed Changer component&#x20;

### Animal Reaction <a href="#animal-reaction" id="animal-reaction"></a>

Animal Reactions can be used to activate or force-activate the state. Check [**Reactions**](https://malbersanimations.gitbook.io/animal-controller/main-components/reactions)

### Public Method <a href="#public-method" id="public-method"></a>

To activate the Jump State via script call the method:

`Animal.State_Activate(9)` or `Animal.State_Activate(StateEnum.Slide)`

***

## &#x20;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**](/animal-controller/main-components/speed-ground-changer.md) 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.

<figure><img src="/files/eaXem7Wa96wjXmTJzRET" alt="" width="439"><figcaption><p>The animal will go down on a slide slope with a 15 value of velocity</p></figcaption></figure>

## Animator <a href="#animator" id="animator"></a>

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

<figure><img src="/files/2pjliqUDuCk9lR6bZNId" alt="" width="488"><figcaption><p>The Enter Transition Condition is State = 9 (ID)</p></figcaption></figure>

<figure><img src="/files/c292b0vzApbHH47lk2cF" alt="" width="479"><figcaption><p>Enter Transition and Conditions</p></figcaption></figure>

### Core Animation <a href="#core-animation" id="core-animation"></a>

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.

<figure><img src="/files/nYEpxQ4Sv7j2Skn1bgiN" alt="" width="563"><figcaption></figcaption></figure>

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

<figure><img src="/files/ZRSiQy8CMjjcgcSRuoSl" alt=""><figcaption></figcaption></figure>

{% hint style="info" %} <mark style="color:green;">**The slide animations do not require to be rootmotion animations**</mark>
{% endhint %}

### Exit Transitions <a href="#exit-transitions" id="exit-transitions"></a>

&#x20;(Newer Version of AC does not require exit transitions on the States)

## Slide Parameters

<figure><img src="/files/UCu0dV3PwmiXC7Y6CzHz" alt="" width="452"><figcaption></figcaption></figure>

### 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)

<figure><img src="/files/kCLSduCj218Jyh6gcYkx" alt=""><figcaption></figcaption></figure>

### Rotation Angle

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

<figure><img src="/files/MqIwn20g4LQH3qLWssma" alt=""><figcaption><p>Value changes from 5 to 50</p></figcaption></figure>

### 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.

<figure><img src="/files/UATq0GUEXa4STo7uaLVa" alt=""><figcaption></figcaption></figure>

### Auto Slope (No Ground Changer)

Activate the Sliding state if the character is on a slope&#x20;

*(It allows to activate the state **without** the Speed Ground Changer Component)*

<figure><img src="/files/ev8CykoRvPzPimGpMxYw" alt=""><figcaption><p>The ground slopes activate the sliding</p></figcaption></figure>

### 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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://malbersanimations.gitbook.io/animal-controller/main-components/manimal-controller/states/slide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
