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
- Add This verse
- Connect Buttons
- Place entity with static_entity component
- Place entity with static_entity_orange component
- 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