🪂Glide
Last updated
Last updated
The Glide State allows the character to glide (Fall gracefully). Its State ID is 11.
To create a new Glide State. use the Plus [+] button on the States list
Or just duplicate any of the already created Glide States Assets of any character you own and drag it to the States List.
The state should have a higher priority than Idle, Locomotion and Fall. but below Death, since the animal can be killed at any time.
When the animal is in this state, all the Lower priorities states are ignored until the exit conditions for this state are fulfilled.
The State requires an Empty Transform set as a Rotator. This Rotator is in charge of the Pitch and Bank rotation of the animal while gliding.
This state mainly uses an Input value to be Activated.
When Pressing the Input Value for Glide
This will be connected automatically with the state if the state has the same value for its Input.
A Zone can activate the Gliding state.
Animal Reactions can be used to activate the state. Check Reactions
Internally, the exit conditions will be executed to check if the State can exit. In the case of this state the conditions are:
The animal is Gliding near the ground so he can land (when Can Land is enable)
The Input for fly is released (when the Glide Input is set to pressed)
The Input for fly is toggled to off (when the Glide Input is set to toggle)
A Higher priority State is Activated. (E.g. The animal glide toward the water)
MAnimal.State_AllowExit() is called.
Glide. Its value is 11
Input to Activate is set to Glide. This should match the Input set on the Malbers/MInput Component
MAIN TAG [Glide]
Input: "Fly"
General
RootMotion = True
Sprint = false
Gravity = false
Grounded = false
Custom Rotation = false
Orient to Ground = false
Ignore Lower States = true
Persistent = false
Lock Movement = false
Lock Input = false
Additional Position Speed = true
Additional Rotation Speed = True
Free Move = true
Limit the State to be activated when any of the conditions on this section is valid.
In the case of the Glide State, this should be only activated when the Fall State is Active.
You can add more limitations if you need.
The Fly state requires an Animation State that is in charge of the Glide movement.
All states have a core animation state. For glide is a blend tree with the Tag Glide.
Since the State is a moving state, the Speed Multiplier must be set as Parameter "SpeedMultiplier"
Glide Enter Animation is Optional
This Blend Tree is usually set this way:
You can use a simplified version with just one animation instead of using a blendtree.
The Glide needs a new Speed Set that affects the Glide State
How much Drag will be applied to the Glide State
Bank Rotation when turning left and right
Forward Pitch Rotation when is gliding forward
Bank Value if Strafe with this State is activated
Pitch Value if Strafe with this State is activated
When Entering the Glide State... The animal will keep the Velocity from the last State if this value is greater than zero
The animal will move forward while Gliding, without the need to push the W Key, or Move forward Input
The animal will change the Camera Input while the Animal is using this State
Layers to Land on
Ray Length multiplier to check for ground near. This value needs to be greater than Land Distance
Minimum Land Distance to Land Automatically
Minimum Ground Distance to Change the State Float Value to 0
Value to Lerp the State Float value