Function virtualAxis

  • Registers a VirtualAxis with the VirtualInput.defaultConfiguration and assigns it to the decorated field.

    Parameters

    • name: string

      Unique name used to access the virtualAxis.

    • type: EnumValue<InputAxis, number>

      Type of physical axis to map to.

    • OptionaldeadZone: number

      Value below which to ignore axis value and consider it 0.

    • Optionalsensitivity: number

      Higher sensitivity means the axis will more easily reach its maximum values.

    • Optionalinvert: boolean

      Should axis values be inverted.

    • Optionalcategory: string

      The category of the axis, if undefined, the default category will be used.

    Returns AttributeDecorator<Attribute>

    The target of the decorator must be a static field of type VirtualAxis.

    If the name already exists in the specified category the previous registration is returned.

    Each category only supports each name uniquely.