Accessing Agent from SucceededEvent in interactable_component disconnects from Fortnite

Summary

Accessing the agent in response to SucceededEvent in interaction_component causes session disconnect.

Please select what you are reporting on:

Verse

What Type of Bug are you experiencing?

Scene Graph

Steps to Reproduce

  1. Create a new Verse class based on interactable_component. Create a callback to subscribe to SucceededEvent, and access the Agent param.
dm_interaction<public> := class<final_super>(interactable_component):
    OnSucceeded(Agent:agent):void=
        Print("Succeeded.")
    
        if (FortChar := Agent.GetFortCharacter[]):
            DebugDraw := debug_draw{}
            DebugDraw.DrawSphere(
                FortChar.GetGlobalTransform().Translation, 
                ?DrawDurationPolicy := debug_draw_duration_policy.FiniteDuration, 
                ?Color := NamedColors.Red,
                ?Duration := 10.0)
  
    OnBeginSimulation<override>():void =
        (super:)OnBeginSimulation()
        SucceededEvent.Subscribe(OnSucceeded)

Fornite session will disconnect, unable to reconnect without closing both Fortnite and UEFN.

[Update]

So it turns out that calling DrawSphere from within the SucceededEvent (either in a callback or using Await) results in overload resolution of the DrawSphere overload that takes the vector3 from the old coordinate system (UnrealEngine.org/Temporary/SpatialMath) despite a value being passed in from the new coordinate system (Verse.org/SpatialMath). Due to both overloads existing in debug_draw, passing in either one results in no compilation errors, but the actual overload resolved was the wrong one. Creating a vector from the old coordinate system and passing that in results in the desired result. This is however unexpected behavior still, as overload resolution chooses the wrong overload when passing in a vector3 from Verse.org.SpatialMath while in the SucceededEvent only. The following code compiles and runs as expected (aside from the fact that you must pass in the old vector3 type)
```

OnSimulate<override>()<suspends>:void= 

    Agent := SucceededEvent.Await()



    if (FortChar := Agent.GetFortCharacter\[\]):

        FortTransform := FortChar.GetGlobalTransform()

        Translation := FortTransform.Translation



        DrawLocation := vector3{X:= Translation.Forward, Y:= -Translation.Left, Z:= Translation.Up}

        DebugDraw.DrawSphere(

            DrawLocation, 

            ?DrawDurationPolicy := debug_draw_duration_policy.FiniteDuration, 

            ?Color := NamedColors.Red,

            ?Duration := 600.0,

            ?Radius := 50.0)

```

Expected Result

The Agent should be valid in callbacks subscribed to SucceededEvent.

Observed Result

Upon interacting with an entity with the interactable_component, the session is disconnected.

Platform(s)

windows