#Movement Syncing

1 messages · Page 1 of 1 (latest)

hallow swift
#

Send your movement code if possible

#

Movement Syncing

severe vessel
#

im using the ModularFirstPersonController from the Asset store, but the controller shouldn't be the issue as the position was syncing when I used a ClientRpc to sync positions

hallow swift
#

Right, but I want to see how you're looping in the ServerRpc with the movement code.

It's quite unlikely the NetworkTransform component is directly the issue. It's a drop and go component.

severe vessel
#

should i send the file? i'm running it in fixedupdate

hallow swift
#

If you want the server responsible for moving a player and syncing that information, the server should be the only one applying updates to transform.position

severe vessel
#

that makes sense

hallow swift
#

You would probably want:

  • The client sends the Input.GetAxis values to the server with a ServerRpc
  • The server runs the movement code and moves the object
  • NetworkTransform automatically syncs that movement to all other clients
severe vessel
#

surely there's a way to just disable the NetworkTransform on the owner though?

hallow swift
#

You want one source of truth so that everyone gets the same position for the object.

hallow swift
#

There's also this if you just want players to be able to move themselves and have it synced without having to send RPCs.

severe vessel
#

the clientnetworktransform?

#

ill read through the article

#

thank you!