Documentation index for AI agents (llms.txt) A Markdown version of every page is available: request the page's source under /docs/, follow the "alternate" link in this page's head, or start from /llms.txt.
Visual Script logo Manual

Gamepad Left Trigger#

Input / Gamepad Left Trigger

  • Can Read

  • Cannot Write

Description#

Returns how much the Left Trigger of the current Gamepad is pressed

Code#

using System;
using UnityEngine.InputSystem;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Get]

    [Title("Gamepad Left Trigger")]
    [Category("Input/Gamepad Left Trigger")]

    [Description("Returns how much the Left Trigger of the current Gamepad is pressed")]
    [Image(typeof(IconGamepadSlider), ColorTheme.Type.Blue, typeof(BadgeArrowLeft))]

    [Keywords("Analog", "Axis", "Shoulder", "L2", "LT")]

    [Serializable]
    public class TypeNumberInputGamepadLeftTrigger : TypeNumber
    {
        public override double Get(Args args)
        {
            Gamepad gamepad = Gamepad.current;
            return gamepad != null ? gamepad.leftTrigger.ReadValue() : 0d;
        }

        public override string ToString()
        {
            return "Gamepad Left Trigger";
        }

        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}
Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.