Download

Multiplayer: Issue with my client input being inconsistent

Context: I’m trying to make a VR game where I can control a mech’s movement using interactable controls inside the cockpit. The player can grab the controls with their VR hands to interact with it during which their controller inputs on that controller(stick and buttons) pass through to the mech and thereby controlling it, when the control isn’t being grabbed their controller inputs don’t transfer to the mech.

As shown in the screenshots there is a Left control(L) and Right control(R). The left control controls the movement and the right control controls the mech’s facing, similar to console FPS control stick setups.

The Issue: My issue is that my movement works perfectly fine if I am just grabbing the left control, but as soon as I try grabbing the right control as well, the mech begins moving very slowly from the perspective of the server and as a result when I let go of the left control my mech snaps to a spot that I have passed long ago.

My findings: I had a similar issue before that I fixed by making the RPC calls reliable, but because it is the character movement that is handling all of the movement replication there is no RPC call in this case. Also I’ve tested inputting the controller inputs directly into the movement call instead of piping it through the left control and it works as expected with that setup, but unfortunately this disallows me to have various controls in the cockpit that do different things and so that solution isn’t usable.

If anyone knows what is going on here or has any ideas what’s happening I’d love to hear it. I have been scratching my head over this issue for a long time now :frowning:

Fig.1: Cockpit setup with Left(L) and Right(R) controls

Fig.2: Input from the player’s controllers to the controls


Fig.3: Input from the player’s controllers to the controls


Fig.4: Pick up the dispatcher event from the controls and calls the mech’s event for stick inputs


Fig.5: Event for Left stick inputs that tells the mech to move