Summary
Custom Scene Graph item entities that are created at runtime don’t display their custom icon, rarity, name and description correctly when granted to a player who is more than 15,000 cm away from the world origin (which appears to match the culling distance). Instead, the inventory displays default/incorrect item information. When the player is within 15,000 cm of the world origin, the exact same item works correctly.
Please select what you are reporting on:
Unreal Editor for Fortnite
What Type of Bug are you experiencing?
Scene Graph
Steps to Reproduce
-
Create a custom Scene Graph item prefab and give it a custom name, description, icon and rarity.
-
Create an instance of the custom item at runtime and grant it to the player using Verse, for example:
CustomItem := MyCustomItem{}
if (Inv := Player.GetInventoryComponent[]):
Inv.AddItemDistribute(CustomItem)
-
Grant the item while the player is less than 15,000 cm away from the world origin (0, 0, 0).
-
The item is granted correctly and displays its custom name, description, icon and rarity in the inventory.
-
Move the player more than 15,000 cm away from the world origin and create and grant a new instance of the same custom item using the same code.
-
The item is still successfully added to the inventory, but its custom name, description, icon and rarity are no longer displayed correctly and are replaced by default/incorrect item information.
Expected Result
The runtime-created custom item should display its configured name, description, icon and rarity correctly when granted to the player, regardless of the player’s distance from the world origin.
Observed Result
When the player is more than 15,000 cm away from the world origin, the runtime-created custom item is still successfully granted to the player’s inventory, but its configured name, description, icon and rarity are not displayed correctly. Instead, default/incorrect item information is displayed. When the player is within 15,000 cm of the world origin, the same item works correctly.
Platform(s)
PC
Video
Additional Notes
As a workaround, the issue can be avoided by calling Drop on the runtime-created item at a transform within a 15,000 cm radius of the player before adding it to the inventory. For example:
CustomItem := MyCustomItem{}
if (ItemComponent := CustomItem.GetComponent[item_component]):
if (ItemComponent.Drop[NearbyTransform]):
if (Inv := Player.GetInventoryComponent[]):
Inv.AddItemDistribute(CustomItem)