Trying to update a transform position from controller -> server (owner)

Hey guys,

I'm currently trying to do a simple position update from a controller (client) to the server (owner).

I've setup a State containing a Transform set to "Everyone except controller".

In the Attached () override I do the following on both (client and server) after the server instantiated the prefab and assigned the control to the clients boltconnection:

public override void Attached () {
state.SetTransforms(this.state.Transform, this.transform);
}

The transform is moved on the client by a simple FPS controller script, which works on the client, but the position doesn't gets updated on the server.

Any idea what I'm missing?

Comments

  • Have you created a BoltCommand to send the input to the server, which then reproduces your input (not the movement), and the compares server - client positions for authoritative response?

    If you're doing authoritative movement, the client has to send the input via BoltCommand. If you're not authoritative, I think the command is sent to everyone? Don't know, never did non-authoritative. The tutorials should cover this. BoltCommand sends input to Controller (client/server), Controller sends movement to Motor (client/server), Motor moves you (client/server), then client checks that you're within teleport threshold of server, or client is corrected position.

    Not at dev machine or i'd post some code.
  • Ah I see, so the command stuff is required even if I have unchecked the "control predicted movement" checkbox?

    My plan was to relay the position for testing purposes before I implement the authoritative movement.
  • Non-authoritative movement isn't something I've delved into... but if you're going to implement authoritative movement, just do it from the start. It's not overly complex, so go for it.

    I am pretty sure the movement gets replicated via the BoltCommand, as it's sending the inputs to recreate the movement rather than sending positions (uLink, ugh). The positions are sent for error correction / authoritative, I think. Again, not at my dev computer to actually look at this stuff.

    Tutorial Chapter 3: Movement