Cheo
Active member
Hello, the Hang ability is not properly stopped when using SetPositionAndRotation with stopAllAbilities and snapAnimator set to true while TransferUp is playing. Here's a video to illustrate the issue :
Here's also the simple code I used :
I wanted to to be able to stop the ability and teleport the character at the same time as I have an issue in my project where the player can end up in an infinite transfer up state when climbing to an upper ledge, which may be caused by yet another issue, I'll likely make an another post about that in the near future. In any case while this may look like an edge case we should be able to use SetPositionAndRotation to teleport the character and stop his abilities instantaneously at any time.
Lastly since this is almost Christmas this can naturally wait a bit ! Merry Christmas to everyone
Here's also the simple code I used :
C#:
using Opsive.UltimateCharacterController.Character;
using UnityEngine;
public class TeleportTest : MonoBehaviour
{
public KeyCode TeleportInput;
public UltimateCharacterLocomotion UCC;
public Transform Target;
private void Update()
{
if (Input.GetKeyDown(TeleportInput))
{
UCC.SetPositionAndRotation(Target.position, Target.rotation, true, true);
}
}
}
I wanted to to be able to stop the ability and teleport the character at the same time as I have an issue in my project where the player can end up in an infinite transfer up state when climbing to an upper ledge, which may be caused by yet another issue, I'll likely make an another post about that in the near future. In any case while this may look like an edge case we should be able to use SetPositionAndRotation to teleport the character and stop his abilities instantaneously at any time.
Lastly since this is almost Christmas this can naturally wait a bit ! Merry Christmas to everyone