FixedUpdate Input System

A utility System for polling input in an Update loop to use in a FixedUpdate loop without missing inputs in-between FixedUpdate ticks.


How to use it:

namespace Sandbox;


public sealed class ExampleComponent : Component
{
private FixedUpdateInputSystem _fixedInput;

protected override void OnStart()
{
// Get a reference to the system.
_fixedInput = Scene.GetSystem<FixedUpdateInputSystem>();

base.OnStart();
}

protected override void OnFixedUpdate()
{
// Query for input like normal.
if ( _fixedInput.Pressed( "jump" ) )
{
Log.Info( "Jump" );
}

base.OnFixedUpdate();
}
}