Summary
The item_spawn_device SpawnItem() function will always spawn an item in the same exact position even after it is moved!
Please select what you are reporting on:
Unreal Editor for Fortnite
What Type of Bug are you experiencing?
Devices
Steps to Reproduce
Place an item spawner, move it in Verse and then call SpawnItem() and it will always spawn in the same original location
Expected Result
After changing positions, the item should spawn in the item_spawner_device new current location
Observed Result
Item always get spawned in the same old location
Platform(s)
UEFN PC WINDOWS 11
Additional Notes
Verse:
@editable
var TestItemSpawner : item_spawner_device = item_spawner_device{}
@editable
var TestProp : creative_prop = creative_prop{}
@editable
var TestButton : button_device = button_device{}
OnBegin<override>()<suspends>:void=
TestButton.InteractedWithEvent.Subscribe(ButtonPressed)
var CurrentPositionItemSpawner : vector3 = TestItemSpawner.GetTransform().Translation
Print("Original TestItemSpawner X : {CurrentPositionItemSpawner.X}, Y: {CurrentPositionItemSpawner.Y}, Z: {CurrentPositionItemSpawner.Z}")
var CurrentPositionTestProp : vector3 = TestProp.GetTransform().Translation
Print("Original TestProp X : {CurrentPositionTestProp.X}, Y: {CurrentPositionTestProp.Y}, Z: {CurrentPositionTestProp.Z}")
var CurrentPositionTestButton : vector3 = TestButton.GetTransform().Translation
Print("Original TestButton X : {CurrentPositionTestButton.X}, Y: {CurrentPositionTestButton.Y}, Z: {CurrentPositionTestButton.Z}")
Sleep(2.0)
var NewPosition : vector3 = vector3{X := 0.0, Y := 0.0, Z := 50.0}
sync:
TestProp.MoveTo(NewPosition,rotation{}, 0.5)
TestButton.MoveTo(NewPosition,rotation{}, 0.5)
TestItemSpawner.MoveTo(NewPosition,rotation{}, 0.5)
ButtonPressed(InPlayer : agent) : void =
Print("Pressed Button!")
var CurrentPositionItemSpawner : vector3 = TestItemSpawner.GetTransform().Translation
Print("NEW TestItemSpawner X : {CurrentPositionItemSpawner.X}, Y: {CurrentPositionItemSpawner.Y}, Z: {CurrentPositionItemSpawner.Z}")
var CurrentPositionTestProp : vector3 = TestProp.GetTransform().Translation
Print("NEW TestProp X : {CurrentPositionTestProp.X}, Y: {CurrentPositionTestProp.Y}, Z: {CurrentPositionTestProp.Z}")
var CurrentPositionTestButton : vector3 = TestButton.GetTransform().Translation
Print("NEW TestButton X : {CurrentPositionTestButton.X}, Y: {CurrentPositionTestButton.Y}, Z: {CurrentPositionTestButton.Z}")
TestItemSpawner.SpawnItem()
Video Result:
From the logs, you can clearly see the Position of the item_spawner_device gets updated, yet the item spawns in the old location