Skip to content

Read Float Value Smooth

Read the current float value of an Input Action and apply frame-rate–independent smoothing.

If the action is not assigned or not enabled, this action returns 0.


Overview

Use Read Float Value Smooth when you want to avoid “twitchy” or “noisy” input from an Input Action and instead get a value that eases toward the actual input over time.

Common use cases:

  • Smoothing gamepad trigger values (e.g., acceleration, zoom)
  • Smoothing mouse wheel or scroll-based zoom
  • Smoothing analog input used to drive UI sliders, camera FOV, or other continuous values

Internally, this action:

  1. Reads the current value of the assigned Input Action.
  2. Multiplies it by the Multiplier.
  3. Uses Mathf.SmoothDamp to gradually move the output toward the input.
  4. Writes the smoothed value to Float Value every frame.

The action’s Default Update Mode is UpdateEveryFrame, so it updates continuously while the state is active.


Action Fields

Field Description
Input Action Reference to the Input Action to read from. Must be part of an Input Action Asset and enabled (for example, via an Action Map or PlayerInput).
Multiplier Optional scale applied to the raw Input Action value before smoothing. Use this to amplify or attenuate the input. Default is 1 (no change).
Smooth Time Approximate time (in seconds) it takes for the smoothed value to reach the target value. Lower values = faster response; higher values = smoother, slower response. Values below 0.0001 are clamped to the minimum. Default is 0.1.
Max Speed Optional maximum rate of change (units per second). By default, this is infinity, meaning no speed limit. Use this if you want to cap how fast the output can change.
Float Value The smoothed output value. This is the value you use in your FSM (e.g., to drive movement, camera effects, or UI).

Usage Notes

  • Input Action must be enabled
    This action does not enable the Input Action for you.
    Make sure the Input Action (or its Action Map / Asset) is enabled, for example using:

    • InputActionMapEnable
    • InputActionAssetEnable
    • Or managed via PlayerInput
  • Choosing Smooth Time

    • 0.05 – 0.15 → responsive but still smooth
    • 0.2 – 0.5 → noticeably slower, more “eased” feel
    • Very low values (approaching 0) will feel almost unsmoothed.
  • Using Max Speed
    Leave Max Speed at its default (infinity) if you just want classic smoothing.
    Set a finite value if you want to hard-limit how fast the output can change.

  • Output is always scaled
    Remember that Multiplier is applied before smoothing.
    For example, a trigger in [0, 1] with Multiplier = 2 will smooth toward [0, 2].


Examples

  • Smooth acceleration from a trigger

    • Input Action: Gamepad / rightTrigger
    • Multiplier: 1
    • Smooth Time: 0.15
    • Use Float Value to drive a vehicle’s acceleration or thrust.
  • Smooth zoom from mouse wheel

    • Input Action: a float action bound to Mouse / scroll
    • Multiplier: 0.1
    • Smooth Time: 0.2
    • Use Float Value to modify camera FOV or distance gradually.
  • Smooth UI slider input from analog stick

    • Input Action: stick axis mapped to a float (e.g., left/right)
    • Multiplier: 1
    • Smooth Time: 0.1
    • Use Float Value to set the slider value or move a UI handle.