Skip to main content

InputSet

Type Alias InputSet 

Source
pub type InputSet = InputSystems;
👎Deprecated:

Use InputSystems instead

Available on crate feature client and (crate features input_bei or input_native or leafwing) only.

Aliased Type§

pub enum InputSet {
    ReceiveInputMessages,
    WriteClientInputs,
    BufferClientInputs,
    PrepareInputMessage,
    RestoreInputs,
    UpdateRemoteInputTicks,
    SendInputMessage,
    CleanUp,
}

Variants§

§

ReceiveInputMessages

Receive the InputMessage from other clients

§

WriteClientInputs

System Set where the user should emit InputEvents, they will be buffered in the InputBuffers in the BufferClientInputs set.

(For Leafwing, there is nothing to do because the ActionState is updated by leafwing) (For BEI, there is nothing to do because the Actions<C> is updated by the BEI plugin)

§

BufferClientInputs

System Set where we update the ActionState and the InputBuffers

  • no rollback: we write the ActionState to the InputBuffers
  • rollback: we fetch the ActionState value from the InputBuffers
§

PrepareInputMessage

Prepare a message for the server with the current tick’s inputs. (we do this in the FixedUpdate schedule because if the simulation is slow (e.g. 10Hz) we don’t want to send an InputMessage every frame)

§

RestoreInputs

Restore the ActionState for the correct tick (without InputDelay) from the buffer

§

UpdateRemoteInputTicks

Update the metadata where we store information about remote inputs that we received, for instance the LastConfirmedInput across all remote clients

§

SendInputMessage

System Set to prepare the input message

§

CleanUp

Clean up old values to prevent the buffers from growing indefinitely