[Scene Graph] Changing origin and moving in the same frame is not working since 40.00

Summary

Relocating an entity immediately after an origin reset causes a desync between the mesh and collision. The mesh fails to update its position, while the collision volume becomes broken at the old coordinates.

This was not the case before 40.00, you could do it instantly without any issues

Please select what you are reporting on:

Verse

What Type of Bug are you experiencing?

Verse

Steps to Reproduce

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

static_entity_orange<public> := class<final_super>(component){}
static_entity<public> := class<final_super>(component){}

debug_device := class(creative_device):
    @editable ButtonAttach : button_device = button_device{}
    @editable ButtonDetach : button_device = button_device{}
    @editable ButtonDetachAndMove : button_device = button_device{}
    @editable ButtonMove : button_device = button_device{}
    OnBegin<override>()<suspends>:void=
        ButtonAttach.InteractedWithEvent.Subscribe(AttachEvent)
        ButtonDetach.InteractedWithEvent.Subscribe(DetachEvent)
        ButtonDetachAndMove.InteractedWithEvent.Subscribe(DetachAndMoveEvent)
        ButtonMove.InteractedWithEvent.Subscribe(MoveEvent)
    AttachEvent<private>(Agent : agent):void=
        AttachToPlayer(Agent)
    MoveEvent<private>(Agent : agent):void=
        for (StaticEntity : Self.GetSimulationEntity[].FindDescendantEntitiesWithComponent(static_entity)):
            for (StaticOrangeEntity : Self.GetSimulationEntity[].FindDescendantEntitiesWithComponent(static_entity_orange)):
                Print("Moved Static Entity to Orange Entity Location")
                StaticEntity.SetGlobalTransform(StaticOrangeEntity.GetGlobalTransform())
                return
    DetachEvent<private>(Agent : agent):void=
        for (StaticEntity : Self.GetSimulationEntity[].FindDescendantEntitiesWithComponent(static_entity)):
            for (StaticOrangeEntity : Self.GetSimulationEntity[].FindDescendantEntitiesWithComponent(static_entity_orange)):
                Print("Detached Entity")
                StaticEntity.ResetOrigin()
                return
    DetachAndMoveEvent<private>(Agent : agent):void=
        DetachEvent(Agent)
        MoveEvent(Agent)
    AttachToPlayer<private>(Agent : agent):void=
        if:
            Character := Agent.GetFortCharacter[]
            CharacterEntity := Character.GetEntity[]
        then:
            for (StaticEntity : Self.GetSimulationEntity[].FindDescendantEntitiesWithComponent(static_entity)):
                Print("Attached Entity")
                AgentOrigin := entity_origin{Entity := CharacterEntity}
                StaticEntity.SetOrigin(AgentOrigin)
                return
  1. Add This verse
  2. Connect Buttons
  3. Place entity with static_entity component
  4. Place entity with static_entity_orange component
  5. Play and observe

Expected Result

Works without bugged mesh/collision

Observed Result

Mesh becomes stuck at old location with collision weirdly bugged

Platform(s)

All

Video

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

Additional note:
There is a lot similiar issues in Scene Graph that if you do something too fast then the mesh stays in the old place or disappears completely. Then only collision is in the new place. Seems like some deep issue in the design