I’ve been trying to make a multiplayer / up-to-4-player death-match style game, (tho it’s a space-fighter style game, in VR)… And I’ve encountered an odd issue…
The players start/join/spawn into a Lobby room, into their own PlayerStarts, and then when the Host is ready, they’re supposed to be Teleported out of that room, and into their own separate hanger-bays, before the actual fight-round starts.
My issue happens here, for some reason… About 50% of the time, the teleport works as intended, when teleporting the player from the Lobby to their Hanger. And it seems to work in all other situations fine, like the normal respawning when a player dies, or quits the match. But that other 50%, of that Lobby-To-Hanger teleport, randomly fails for some reason. I haven’t been able to determine much of a pattern in my own debugging, and I’ve tried several methods to fix this, with no luck. I’ve tried using several different functions, Teleport, SetLocation, SetLocationAndRotation, and tried setting the root component instead of the actor… They all randomly fail in this scenario. I’ve even tried setting up a couple different types of loops, that were supposed to check if the player actually moved, and try again if they didn’t, but even that didn’t fix it the random failure to move… Tho I’m not sure I did that right either.
I’m not sure if my code is doing something wrong… The teleport function/event is set to RunOnServer reliably, and all other code I run around it seems to be working fine in debug. I’ve tried complicated solutions and simplified ones… Been stuck on this for weeks, and I’m at my wits end. Starting to think this might be a bug…