Moving with object issue after hanging

Instant

New member
This problem can be reproduced in the demo scene of the Agility Pack

The character does not move with a moving object
if the jump originates from another platform where the character did not start hanging (i.e., the character hangs on the first platform, then moves to another platform and jumps)

Steps to Reproduce:
  • hang from the first platform
  • while hanging, change to another platform.
  • stop hanging
  • climb onto any moving platform
If the character starts hanging and jumps from the same platform, the character will move with the object as expected

This issue appears to occur because when the character starts hanging, the first platform is set as a moving platform (`UltimateCharacterController/Scripts/Character/Abilities/DetectObjectAbilityBase.cs` in `AbilityStarted()`). However, when the character changes platform and jumps, the condition for clearing the moving platform has failed because `m_CharacterLocomotion.MovingPlatform` is still referencing the starting platform (`UltimateCharacterController/Scripts/Character/Abilities/DetectObjectAbilityBase.cs` in `AbilityStopped(bool force, bool triggerExit)`).
 
Thanks. The Hang ability is not updating the moving platform when doing the transform. You can fix this by setting the MovingPlatform when the DetectedObject property is set. Change the following within DetectObjectAbilityBase:

Code:
            protected set
            {
                if (m_DetectedObject == value) {
                    return;
                }
to:
Code:
            protected set
            {
                if (m_DetectedObject == value) {
                    return;
                }
                if (m_MoveWithObject && m_CharacterLocomotion.MovingPlatform == m_DetectedObject) {
                    m_CharacterLocomotion.SetMovingPlatform(DetectedObject.transform, true);
                }
 
Back
Top