Twin stick camera randomly locking players Yaw to 90 degrees

Summary

Im trying to make a top down game, and I have implemented a mechanic which dash/teleports the player a short distance based on where the rotation of their player is. The twin stick controls seem to be working, and I can aim my player, my weapon fire etc where ever I want. For a short period, my dashes work and have proper rotation, but for some reason randomly my Yaw gets locked to 90 and nothing works anymore.

Please select what you are reporting on:

Creative

What Type of Bug are you experiencing?

Devices

Steps to Reproduce

  1. Add third person controls
  2. Add third person camera
  3. Add dash script and hook it up to input trigger that consumes Jump

using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }

# See https://dev.epicgames.com/documentation/en-us/uefn/create-your-own-device-in-verse for how to create a verse device.

# A Verse-authored creative device that can be placed in a level
dash_device := class(creative_device):

    @editable
    SpacebarInput : input_trigger_device = input_trigger_device{}
    
    @editable
    DashDistance : float = 600.0
    
    @editable
    DashDuration : float = 0.2
	 
    # Runs when the device is started in a running game
    OnBegin<override>()<suspends>:void=
        SpacebarInput.PressedEvent.Subscribe(SpacebarPressed)


    SpacebarPressed(Agent:agent):void=
        if (Character := Agent.GetFortCharacter[]):
            Transform := Character.GetTransform()
            # Get the forward vector in the direction the character is facing
            Forward := Transform.Rotation.GetLocalForward()
            # Calculate the target position by moving forward DashDistance units
            TargetPosition := Transform.Translation + (Forward * DashDistance)
            # Use TeleportTo to instantly move the character to the target position

            #print the players rotation for debug purposes
            RotationXYZ := Transform.Rotation.GetYawPitchRollDegrees()
            if:
                RotationYaw := RotationXYZ[0]
                RotationPitch := RotationXYZ[1]
                RotationRoll := RotationXYZ[2]
            then:
                Print("Player Rotation: Yaw: {RotationYaw} Pitch: {RotationPitch} Roll: {RotationRoll}")

            if (Character.TeleportTo[TargetPosition, Transform.Rotation]):
                # Teleport was successful
                Print("Dash successful")

  1. Notice how after a short duration, the debug logs in the top left show Yaw rotation locked to 90 degrees

Expected Result

Rotation should respect where the player is actually facing in the viewport.

Observed Result

Rotation yaw gets locked to 90 degrees causing unexpected behaviors

Platform(s)

All

Video

I just noticed that if a player sprints, it seems to fix the rotation lock for the sprinting duration. As soon as they stop sprinting, the yaw gets locked to 90 degrees again.

Theres definitely some weird underlying issue with the camera and player rotation here. I notice that if I move my cursor in 360s, trying to make my character spin, the upper half of their body moves, but then their hips completely break and get stuck pointing forward while their body turns all the way around. This is a slightly different issue, but it definitely points to the same underlying root cause

FORT-1054650 has been created and its status is ‘Unconfirmed’. This is now in a queue to be reproduced and confirmed.

Really makes 0 sense to me why it works for short duration after spawning, then just stops. I cant find any workarounds. The character rotation is just wrong…