Summary
I am experiencing a bug where a volume device is in two different spots for each player on my map, and also stops calling its subscribed AgentEntersEvent. The map is procedurally generated and the volume is attached to a prop that teleports to where the next tile should be placed. No idea how this happens if Verse is run on server, and everything else still runs smoothly when this bug happens. Note that this only happens with multiple players, 1 player works fine.
Please select what you are reporting on:
Unreal Editor for Fortnite
What Type of Bug are you experiencing?
Devices
Steps to Reproduce
- attach volume to creative prop
- In verse: on the volumes AgentEntersEvent, teleport the prop forward 25000 on y axis
- Launch playtest with 2 or more players
Expected Result
Volume should teleport 25000 on y axis every time agents hits it and call AgentEntersEvent
Observed Result
- Volume sometimes works for a bit, then breaks completely
-Sometimes it works for only one player, sometimes both, sometimes none
-Can be in different locations on each device playing
Platform(s)
PC, Switch Lite
Upload an image
Additional Notes
Images show how the volume is next to the player on one device but far on the other one. When it breaks like this neither player calls the OnAgentEnters event anymore. My code that runs OnAgentEnters but stops running at certain point:
AddTile(Agent: agent): void =
Print("ADD")
#fetch tile to place
tileProp := GetRandomTile()
#delete first in array
if:
oldTile : creative_prop = Tiles[0]
then:
spawn{DeleteTile(oldTile)}
else:
Print("NO FIRST TILE")
BiomeMessage.Show(Agent)
#remove element
if:
NewArray := Tiles.RemoveElement[0]
set Tiles = NewArray
then:
block:
#then add new last one at correct position
location := vector3{X := 0.0, Y := currentOffset, Z := 1.0}
tileSpawn := SpawnProp(tileProp, transform{Translation := location})
#add new one to end
if:
addedTile := tileSpawn(0)?
set Tiles += array{addedTile}
then:
block:
#Then we gotta teleport the detector prop ahead
detectorLocation := addTileProp.GetTransform().Translation
newLocation := vector3{X:= detectorLocation.X, Y:= detectorLocation.Y - tileSize, Z:= detectorLocation.Z}
DetectorRotation : rotation = MakeRotationFromYawPitchRollDegrees(0.0,0.0,0.0)
if(addTileProp.TeleportTo[newLocation, DetectorRotation]):
#update offset
set currentOffset -= tileSize
#check if we need to tunnel/reset (less than because going negative)
if(currentOffset < tunnelDistance):
spawn{SpawnTunnel()}`