Which function is being called?


In image 1 we can see that ApplyRotation(DeltaTime) as well as UpdateLocationFromVelocity(DeltaTime) is being called . Also we are updating the location of our gokart on the server through funtions from figure 2 . So my question is

What is the point of Replicating from server to client if we are updating our location from client to server?

Don’t we have to remove ApplyRotation(DeltaTime) as well as UpdateLocationFromVelocity(DeltaTime) from our code?

I’m reading it that in this exercise we are updating location and rotation on both client and server every tick however after we have done that.
if it’s the server we store the server location and rotation in the two replicated variables
if it’s the client we read the replicated server values and then overwrite the client settings bringing it back in line with the server if it is out of sync because of the reasons described in previous lectures.

This could lead to glitching on the client as it will keep getting reset to whatever the last replicated value is depending on latency etc. but may be good enough depending on the game (or usage, if we dont need realtime input for example)

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

Privacy & Terms