s&box/field-guide
the symptom, in your words

"No public per-action analog trigger axis — triggers are digital-only"

✓ verified on engine 26.07lane: Writing gameplayposted
▸ SYMPTOM

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.

▸ CAUSE

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 the InputAnalog enum only backs the built-in Move/Look aggregates — there's no per-named-action overload.
  • InputAction (what every Input.config entry deserializes into) carries only Name, GroupName, Title, KeyboardCode, and GamepadCode — 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)

▸ FIX

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:

snippet
// 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:

snippet
float rawTrigger = Input.CurrentController?.GetAxis(
    NativeEngine.GameControllerAxis.RightTrigger, 0f ) ?? 0f;

Note: this path is unverified in practice for game-code compilation under the whitelist.

▸ WHY IT WORKS

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.

Verified on engine 26.07 — seen in a real project.
s&box moves fast; an undated fix is a liability. Spot a stale detail?