[SCENE GRAPH] Set Local Transform Issue

Summary

If an entity has a defined entity origin, calling Set Local Transform will only work once. Any subsequent calls to this function will have no effect until a new entity origin is set using Set Origin.

After a new origin is defined, Set Local Transform can be applied again — but, once more, only for a single call.

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



entity_local_transform_bug_report := class(creative_device):

    @editable OriginEntityTransformProp<private> : creative_prop = creative_prop{}

    OnBegin<override>()<suspends> : void =
        OriginEntity := Prefabs.PF_Sphere{}
        ChildEntity := Prefabs.PF_Cube{}
        OriginEntity.SetGlobalTransform(FromTransform(OriginEntityTransformProp.GetTransform()))
        ChildEntity.SetOrigin(entity_origin. Entity := OriginEntity)
        # First call.
        ChildEntity.SetLocalTransform((/Verse.org/SpatialMath:)transform{})
        (GetSimulationEntity[] or Err()).AddEntities(array{OriginEntity, ChildEntity})
        loop:
            Sleep(1.0)
            Print("Updating ChildEntity's local transform...")
            LocalTransform := ChildEntity.GetLocalTransform()
            # Subsequent calls do not work unless the origin is defined again.
            # ChildEntity.SetOrigin(entity_origin. Entity := OriginEntity)
            ChildEntity.SetLocalTransform of:
                (/Verse.org/SpatialMath:)transform:
                    Translation := 
                        (/Verse.org/SpatialMath:)vector3:
                            Up := LocalTransform.Translation.Up + 25.0

Please select what you are reporting on:

Creative

What Type of Bug are you experiencing?

Verse

Steps to Reproduce

1 - Create two entities.
2 - Set the origin of one of the entities to be based on the other (SetOrigin).
3 - Add both entities to the simulation.
3 - Call Set Local Transform on the “child” entity.
4 - Try call it again with a different transform.

Expected Result

All calls to Set Local Transform should take effect.

Observed Result

Only the first call to Set Local Transform takes effect.

Platform(s)

PC

Upload an image

Video

Showing the problem:

Redefining the origin in every iteration of the loop: