Entities at a distance from the player don't get removed client side.

Summary

Entities don’t get removed client side if the player is to far away, also seems to impact framerate.

Please select what you are reporting on:

Unreal Editor for Fortnite

What Type of Bug are you experiencing?

Other

Steps to Reproduce

Spawn Entities at different distances from player and remove them afterwards

Ent_spawning := class(creative_device):
@editable GridSize:int = 10
@editable GenerateTrigger: input_trigger_device = input_trigger_device{}

var Ents: []entity = array{}
var GenerationCount:int=0
# constant or variable
# Runs when the device is started in a running game
OnBegin<override>()<suspends>:void=
    GenerateTrigger.PressedEvent.Subscribe(GenerateWEntity)

GenerateWEntity(Agent:agent):void=
    for(Ent:Ents). Ent.RemoveFromParent()

    if(SimEnt:=GetSimulationEntity[]):
        for(I:=0..GridSize-1):
            for(J:=0..GridSize-1):
                NewEnt:=entity{}
                MC:=Box_EDB0FEFA{Entity:= NewEnt}
                NewEnt.AddComponents(array{MC})
                NewEnt.SetGlobalTransform(transform{Translation:=vector3{X:=I*500.0, Y:=J*500.0, Z:=GenerationCount*550.0}, Rotation:=IdentityRotation(), Scale:=vector3{X:=1.0,Y:=1.0,Z:=1.0}})
                SimEnt.AddEntities(array{NewEnt})
                set Ents += array{NewEnt}
    set GenerationCount+=1

OnEnd<override>():void=
    for(Ent:Ents). Ent.RemoveFromParent()

Expected Result

All entities get removed.

Observed Result

Entities at a longer distance will remain on screen.

Platform(s)

PC

Video

This topic was automatically closed after 180 days. New replies are no longer allowed.