Skip to content

InputEventJoypadMotion

Eduard Gushchin edited this page Jun 21, 2026 · 5 revisions

Home | API by Category | Complete API Index | API Compatibility

Field Value
Full name Electron2D.InputEventJoypadMotion
Namespace Electron2D
Kind class
Category Input

Overview

Represents a gamepad axis motion event.

Syntax

public class Electron2D.InputEventJoypadMotion : Electron2D.InputEvent

Remarks

Axis motion is delivered through Electron2D.Node._Input(Electron2D.InputEvent) and updates both Electron2D.Input.GetJoyAxis(System.Int32,Electron2D.JoyAxis) and Electron2D.InputMap action state.

The device id is stored in Electron2D.InputEvent.Device. Unknown devices are registered as connected placeholder devices when an axis event is processed.

Thread Safety

Instances are mutable and are not synchronized; use them from the input dispatch thread that owns the event.

Since

This class is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Input.GetJoyAxis(System.Int32,Electron2D.JoyAxis)
  • Electron2D.InputMap
  • Electron2D.JoyAxis

Members

Member Kind Summary
Axis Property Gets or sets the gamepad axis represented by this event.
AxisValue Property Gets or sets the normalized axis value.
Electron2D.InputEventJoypadMotion() Constructor Initializes a new instance of the InputEventJoypadMotion type.

Member Details

Axis

Kind: Property

public Electron2D.JoyAxis Axis { get; set; }

Summary

Gets or sets the gamepad axis represented by this event.

Remarks

Invalid axes do not match action bindings and are ignored by Electron2D.Input.GetJoyAxis(System.Int32,Electron2D.JoyAxis).

Value

A Electron2D.JoyAxis value, or Electron2D.JoyAxis.Invalid for an unmapped axis.

Thread Safety

This property is not synchronized.

Since

This property is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.InputEventJoypadMotion

AxisValue

Kind: Property

public System.Single AxisValue { get; set; }

Summary

Gets or sets the normalized axis value.

Remarks

Action bindings compare this value with the sign stored in the binding event. The absolute value becomes action strength when it is outside the action deadzone.

Value

A finite value clamped to the range -1.0 through 1.0.

Thread Safety

This property is not synchronized.

Since

This property is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.InputEventJoypadMotion

Electron2D.InputEventJoypadMotion()

Kind: Constructor

public Electron2D.InputEventJoypadMotion()

Summary

Initializes a new instance of the InputEventJoypadMotion type.

Remarks

The new instance follows the lifetime and validation rules of its declaring type.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.InputEventJoypadMotion

Clone this wiki locally