FixedUpdate Input System

thumb
Identnull.fuib
Typelibrary
Created
Updated
Latest Version 62303 4.5 KB +2 ~1 -1
Tags utility fixedupdate
Links s&box
SummaryUtility system for polling input reliably in FixedUpdate
Description
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(); base.OnStart(); } protected override void OnFixedUpdate() { // Query for input like normal. if ( _fixedInput.Pressed( "jump" ) ) { Log.Info( "Jump" ); } base.OnFixedUpdate(); } }
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(); base.OnStart(); } protected override void OnFixedUpdate() { // Query for input like normal. if ( _fixedInput.Pressed( "jump" ) ) { Log.Info( "Jump" ); } base.OnFixedUpdate(); } }
Votes 1 0 1
Error Rate0%
Reviews
1 reviews
100% Recommended (1) 0% Promise (0) 0% Needs Work (0)
Data
{}