"No public per-action analog trigger axis — triggers are digital-only"
You bind a gamepad trigger (e.g. "RightTrigger") to an Input.config action expecting to read a smooth 0–1 pull value, but only get digital on/off via Input.Down / Input.Pressed / Input.Released. There's no analog axis value for trigger actions.
The public input API has no per-action analog trigger axis. Verified by reflecting the SDK's Sandbox.Engine.xml:
- The only analog-read API is
Input.GetAnalog(InputAnalog), and theInputAnalogenum only backs the built-inMove/Lookaggregates — there's no per-named-action overload. InputAction(what everyInput.configentry deserializes into) carries onlyName,GroupName,Title,KeyboardCode, andGamepadCode— no analog flag.
A raw SDL axis exists one layer down via Sandbox.Controller.GetAxis(NativeEngine.GameControllerAxis, float), reachable through Input.CurrentController, but it takes a NativeEngine-namespace enum with zero verified usage in production game code — it's unclear whether it compiles and works from ordinary game code under the whitelist. (needs verification)
Practical pattern for "analog-feeling" trigger control (e.g. throttle/brake in a vehicle):
Keep the stick axis (Input.AnalogMove) as the continuous proportional control and treat the trigger as an additive full-value boost on top — not a proportional read:
// Stick gives smooth 0..1 control
float throttle = Input.AnalogMove.y;
// Trigger adds a full boost when pressed (digital)
if ( Input.Down( "Boost" ) )
throttle = 1f;This gives players continuous analog control via the stick with a trigger-activated override, sidestepping the lack of a trigger axis API entirely.
If you need true analog trigger input and are willing to use the unverified lower-level API:
float rawTrigger = Input.CurrentController?.GetAxis(
NativeEngine.GameControllerAxis.RightTrigger, 0f ) ?? 0f;Note: this path is unverified in practice for game-code compilation under the whitelist.
The input system treats gamepad triggers as buttons, not axes — they fire at a threshold and report pressed/released, losing the analog range. By mapping continuous control to the stick (which does have a public analog API via Input.AnalogMove) and using the trigger as a digital modifier, you get the gameplay feel of analog control without fighting the API limitation.