Skip to content

Question about property syncing without ownership #219

Closed Answered by elementbound
Netherite1701 asked this question in Q&A
Discussion options

You must be logged in to vote

Ok, I looked into it and I get what's your issue - the head rotation is synchronized by a MultiplayerSynchronizer node, but it gets reset on clients, because the player avatar's owner is the server.

I would recommend moving the mouselook logic to the rollback loop, same as with player movement.

To do so, gather the mouse movement into a property on PlayerInput. Then, in the player's _rollback_tick, apply that. Make sure to configure both the mouse input and the player- and neck rotation as input and state properties in the RollbackSynchronizer.

This would also mean that the mouselook would be tied to the network tickrate even for the local player. To counteract this, you should be able to…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Netherite1701
Comment options

@elementbound
Comment options

Answer selected by elementbound
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants