Summary
When an Entity with a interactable_component
is created if on the same tick it is placed inside the world it is also teleported the Interact Widget gets stuck at the original location
Please select what you are reporting on:
Verse
What Type of Bug are you experiencing?
Verse
Steps to Reproduce
- Create a verse script that can instance a new entity with an interactable component and a mesh_component that also changes the transform on the same tick. (Or Copy paste the script in the notes)
- Place it down and start the game.
- Have the new entity created and teleported.
- Go Near it to see the interact Widget is not showing
Expected Result
Interact Widget Located in the entity’s location
Observed Result
Interact Widget located in the parent entity location
Platform(s)
windows
Island Code
8302-7867-6628
Upload an image
Video
Additional Notes
using { /UnrealEngine.com }
using { /Verse.org/SceneGraph }
using { /Verse.org/Simulation }
using { /Verse.org/SpatialMath }
MainComponent<public>:=class<final_super>(component):
OnBeginSimulation<override>():void =
(super:)OnBeginSimulation()
Print("OnBeginSimulation")
OnSimulate<override>()<suspends>:void =
# TODO: Place simple suspends logic to run for this component here
Print("OnSimulate")
InteractableComponent:=interactable_component{Entity:=Entity}
Entity.AddComponents(array{InteractableComponent})
InteractableComponent.SucceededEvent.Subscribe(OnPressed)
OnPressed(Agent:agent):void=
NewEntity:=entity{}
NewEntity.AddComponents(array{SubComponent{Entity:=NewEntity}})
if(SIMentity:=Entity.GetSimulationEntity[]):
SIMentity.AddEntities(array{NewEntity})
SubComponent<public>:=class<final_super>(component):
OnBeginSimulation<override>():void =
(super:)OnBeginSimulation()
Print("OnBeginSimulation")
OnSimulate<override>()<suspends>:void =
# TODO: Place simple suspends logic to run for this component here
Print("OnSimulate")
MeshComponent:=BasicShapes.cube{Entity:=Entity}
TransformComponent:=transform_component{Entity:=Entity}
InteractableComponent:=interactable_component{Entity:=Entity}
Entity.AddComponents(array{TransformComponent})
Entity.AddComponents(array{MeshComponent})
Entity.AddComponents(array{InteractableComponent})
#Sleep(0.01)
Entity.SetGlobalTransform(transform{Translation:=vector3{Left:=-1033.0,Up:=54.0,Forward:=256.0}})