r/UnrealEngine5 • u/Rukonon • 20h ago
Elevator + Multiplayer
Hey everyone! I’m looking for advice on how to properly implement a multiplayer elevator in Unreal Engine.
My current implementation works as follows:
The elevator actor is replicated with Replicate Movement enabled.
- The elevator moves using a Timeline that runs on the server.
- While moving, the elevator checks which players are inside and adjusts their Z position using Set Actor - Location to prevent them from falling through the platform.
Everything generally works fine. However, when the host has low FPS, players can still occasionally fall through the elevator platform.
I understand that using Set Actor Location to manually adjust player positions isn’t the best approach, but I haven’t found a more reliable solution yet.
Main requirements:
- The elevator cabin is open, so its movement must be visible to all players.
- Players must be able to walk freely inside the cabin while the elevator is moving.
The elevator must work reliably even when the host has low FPS.
Has anyone dealt with a similar problem? Is there a better and more reliable way to implement moving elevators in multiplayer?
Any advice would be greatly appreciated!
4
u/SayuriShoji 14h ago
Try using a NetMulticast RPC to activate the timeline on both server and all clients for moving the elevator, so both the server and all clients are moving the elevator on their own, so clients can properly predict the elevator movement and smooth movements of any objects inside.
And issues are always to be expected when the server can't keep up a high update rate, this goes for any game. That's why usually the player with the best computer / best connection should be host.
1
u/Time-Masterpiece-410 16h ago
I'm no expert but why do you even need to set actor location? Collision isn't enough?
2
u/VideoGameOrcs 12h ago
What are you using to move the elevator on the server? As in, SetActorLocation? A MovementComponent?
1
u/North-Aide-1470 8h ago
Many games attach their characters to the elevator. But I prefer to (with opaque elevators) just fake it. Pretend the elevator is moving but simply teleport the players when it 'reaches' it's destination, you can teleport the whole elevator too.
In your situation with your current setup have you tuned or disabled the NetWork Smoothing option for Character Movement Components?