Hang: Shimmy speed after using jump with root motion

Chickenfield

New member
Hi,

I've been integrating the Hang ability from the agility pack into my project. My scenario is: Jump from the ground to a ledge and hang on it. While it works ok when I'm using the "standard" opsive jump, it behaves strange when using a jump ability that utilizes the root motion position (Use Root Motion Position = True, on the jump ability).
The differences I noticed:
- The shimmy speed is a lot faster
- When shimmying towards edges, the player gets way closer to the edges than with the normal jump ability
- When activating the Speed Change ability while hanging and shimmying, the edge detection doesn't work and the player can shimmy right off the ledge and fall (the ability stops ok, though). With the standard jump, the character stops at the edge as expected

I'm pretty sure it is related to using root motion, as that is the only change. Do you have an idea what I can do? Can you reproduce this behaviour on your end?

Thanks,
Best regards,
Patrick
 
The jump animation should not affect it at all since the jump ability is not active when hang is active. Hang does use root motion and based on your explanation it sounds like you are not using root motion. Are you sure your ability is using root motion?
 
Hi Justin,
sorry for the long delay. Life got in between.

It is actually reproducable without any of my custom code, just vanilla UFPS and the agility pack:

Setup:
- Create a fresh project (I'm using Unity 2020.3.23f1)
- Import UFPS v 2.4.5, install, update buttons and layers from the Character Manager
- Import Agility Pack v 1.1.1
- Open the Demo from the Agility Pack

Scenario A (expected behaviour):
- Press Play
- Walk over to the hang area
- Jump so that Nolan starts to hang
- Move left and right, notice the normal speed

Scenario B (the one I'm having trouble with)
- Select Nolan in the hierarchy, scroll down to the Jump ability
- Change the properties "Use Root Motion Position" and "Use Root Motion Rotation" to true
- Press Play
- Walk over to the hang area
- Jump so that Nolan starts to hang
- Move left and right, notice the speed difference (he is noticably faster)
- Press shift and notice how Nolan shimmies so fast that he can just shimmy off the border

Since the jump ability is stopped when the Hang abilty starts, it theoretically shouldn't matter if the previously active ability was using root motion or not. Can you explain to me where this is coming from, and how we can get around that?

Thanks,
Best regards,
Patrick
 
Thanks, I was able to reproduce it. I'll let you know after I get a chance to fix it.
 
Top