Joystick Node

From RoboPad Wiki
Revision as of 02:57, 1 March 2023 by Blayze (talk | contribs) (Created page with "{{Node Data |title=Joystick Node |gallery=<gallery mode="slideshow"> File:Joystick-node.png File:Joystick-settings.png </gallery> |output-list=<li>signal</li> }} The Slider Node is a UI Node that places a slider on the controller. A slider is a simple element that can can be dragged in one direction - either up and down or left and right. Joystick Nodes were introduced in firmware version 2.1 along with all basic nodes. == Outpu...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Joystick Node
Inputs
    none
Outputs
  • signal
Version Introduced
2.1

The Slider Node is a UI Node that places a slider on the controller. A slider is a simple element that can can be dragged in one direction - either up and down or left and right.

Joystick Nodes were introduced in firmware version 2.1 along with all basic nodes.

Outputs

Joystick Nodes are very similar to Slider Nodes, but have an additional degree of freedom, meaning they can move in 2 axes. They are designed to mimic traditional dual-axis joystick found on a physical controller. Joystick Nodes have two output ports - x and y, reflective of the stick's position in the x axis and y axis of it's region of movement. Both outputs are emitted from 0 to 1 (clipped), every time the slider is moved when in the controller.

Settings

The Joystick Node's settings can be configured to alter it's visual presentation, mode of operation and output value mapping.

As a UI Node, the Joystick Node possesses the UI Transform and Background Colour settings. All UI Nodes draw to a region on the controller - this is an area that will be populated by the Joystick Node's display elements.

  • UI Transform: Configures the position of this Joystick Node's UI element within the controller. The Position x and y values control the position of the center of this element on the controller, from the bottom left (i.e. x and y values of 0 result in its center being in the bottom left, x and y values of 1 result in its center being in the top right). The Scale x and y values control the width and height of this Joystick Node's UI element, relative to the controller's width and height. Scaling occurs from the center of the Joystick.
  • Background Colour: Configures the background colour of this Joystick Node's UI region when it is drawn to the controller.
  • Stick Colour: Configures the colour of the stick of this joystick as it's seen in the controller.
  • X-Axis Release Behaviour: Configures what should happen to the stick when a held click or touch is released, but only along the x-axis - reset will result in the stick returning to it's x-axis (horizontal) Start Position when released - much like a spring-loaded self-centering joystick on a traditional physical controller, while hold will leave the stick in it's current position along the x-axis, similar to non-self-centering joysticks. Joysticks set to hold in the x-axis will render with three little vertical bars in the center of the stick.
  • Y-Axis Release Behaviour: This behaves identically to the X-Axis Release Behaviour, but along the y-axis (vertically).
  • X-Axis Start Position: This configures both the position the slider starts in along the x-axis (horizontally) and the position that it returns to if it's X-Axis Release Behaviour is set to reset.
  • Y-Axis Start Position: This behaves identically to the X-Axis Start Position, but along the y-axis (vertically).
  • Invert X Axis: This option inverts the output along the x-axis (horizontally). By default a fully leftwards stick position makes the output x port emit 0, and a fully right stick emits 1, however enabling this inverts that, with a stick position fully to the left emitting 1 and a fully right position emitting 0. Note that similar achievement could be achieved by using an Inverter Node on the x output port.
  • Invert Y Axis: This behaves identically to the Invert X Axis option, but inverts along the y-axis (vertically).

Gallery