Change between align to gravity zone and align to ground abilities on runtime through trigger

Hi, I'm newer to the system so please bear with me.

I'm trying to make a platformer that activates the align to ground ability when the character comes in contact with a trigger (box collider) and then deactivates the state when they go outside the trigger.
From the demo, I saw that there's a State Trigger Script, but it doesn't seem to be working as intended when the StateName is set to AlignToGround or AlignToGravityZone. Is this the correct way of doing this? What am I doing wrong?
Bear in mind, I'm almost positive I'm making some sort of basic mistake. It also doesn't have to be a box collider if there's a simpler way of doing this.

Please Advise!
 

Attachments

  • 1.png
    1.png
    548.7 KB · Views: 2
  • 1.png
    1.png
    497.4 KB · Views: 2
  • 2.png
    2.png
    518 KB · Views: 2
On the Ultimate Character Locomotion component did you create the AlignToGravityZone/AlignToGround states? This is what the State Trigger script is setting.
 
*facepalm*
Yep that was it.

I actually had the states on the abilities for AlignToGround, but the State being called on the State Trigger Script was AlignToGround and the State that was on the AlignToGround Ability was DynamicGravity which used the EnableAlignToGound State Preset

I changed the State name on the Character's AlignToGround Ability to AlignToGround and it worked as indented.

Thank you, I appreciate your help.

Here's some pictures to help out others if they come across this same issue.
 

Attachments

  • 1.png
    1.png
    562.8 KB · Views: 1
  • 2.png
    2.png
    466 KB · Views: 1
Back
Top