Implementing Dimension-Specific Door Collision in Multiplayer

I’m working on a multiplayer project that features a unique dimension-based gameplay mechanic, where each player exists in their own “dimension” within the same game world. In this setup, actions in one dimension, such as opening a door, do not affect the state of the door in other dimensions. However, I’ve encountered a challenge with physical door movements and collision handling. Specifically, when a door is opened (physically moved up) in one dimension/server-side, it allows players from all dimensions to pass through the space where the door was, despite the door being closed (and should be blocking) in their respective dimensions.

I need a solution that allows the door to visually and physically move for players in the dimension where it is opened, without affecting its collision state for players in other dimensions. The goal is to maintain dimension-specific collision states that are consistent with each player’s perspective, ensuring players only interact with the game world according to the state of objects in their own dimension. How can I implement this, ensuring that collision detection and physical representation of objects like doors are accurately maintained across dimensions, particularly in a multiplayer environment?

Each door needs to be its own replicating instance.

I don’t think you understand what I want to ask. I have 4 different dimensions in my game and each object has a separate state in each dimension for example: Door “A” may be open in Dimension 2 but it is closed in Dimensions 1, 3 and 4, but if the player playing in Dimension 2 is a server, players in other dimensions can pass through it even if the door is closed for them because the collision is calculated according to the game on the server.

Listen Server shenanigan’s!

What I’m getting from your description is your game has a player area that is mirrored for each player. e.g. a play area that’s duplicated for each client.

So say your dimension has a single door. In reality there are literally 4 instances of that door actor. One for each dimension. If the host opens his door in his world he’s only modifying the state of the door in his dimension.

The only way I see your issue happening is if each player isn’t literally playing in his/her own dimension play area.

Thank you for your reply. However, I’m seeking an alternative approach to collision handling on both client and server sides, as I do not wish to create four different instances of everything.

So you are confirming that ALL players are interacting with the same instance of the door?

Does the door “require” replication? As in Server Authority to open/close etc?
If not you can simply turn of replication on it and handle interaction for it locally.

If so, then you’ll have to write an access control list (ACL) for handling the replicated state.

I’ve found a solution to the challenge of managing dimension-specific collision states in multiplayer environments, particularly for scenarios where objects like doors have different states (open/close) across player dimensions. By setting the ClientAuthorativePosition boolean to true in the GameNetworkManager , you can enable individual clients to manage the positioning and collision states of objects in their own dimension.

ClientAuthorativePosition gives the client authority over its “position”… Movement.

If client update is within MAXPOSITIONERRORSQUARED of what the server expects then the client is authoritative on it’s final position

you can enable individual clients to manage the positioning and collision states of objects in their own dimension.

Turning off replication on the door and handling interaction locally does the same thing.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.