Lumberyard
Legacy Reference

Input Nodes

Flow Graph is deprecated and will be removed in a future version of Lumberyard. Learn about Script Canvas, Lumberyard's new visual scripting environment.

This topic references tools and features that are legacy. If you want to use legacy tools in Lumberyard Editor, disable the CryEntity Removal gem using the Project Configurator or the command line. To learn about the latest features, see the Amazon Lumberyard User Guide.

You can use the following flow graph nodes to capture input events and configure input settings.

ActionFilter node

Used to catch key inputs. Should only be used for debugging purposes however.

Inputs

Port Type Description
Enable Any Enables the node
Disable Any Disables the node
Filter String Name of the action filter

Outputs

Port Type Description
Enabled Any Triggers when enabled
Disabled Any Triggers when disabled

ActionHandler node

Used to respond to actions listed in the Action Map input.

Inputs

Port Type Description
Enable Any Enables listening to the action map
Disable Any Disables listening to the action map
Action Map String Name of the action map
ActionName String Name of the action to listen for

Outputs

Port Type Description
ActionInvoked Any Triggers when the action is invoked
ActionPressed Any Triggers when the action is pressed
ActionHeld Any Triggers when the action is sustained
ActionReleased Any Triggers when the action is released

ActionListener node

Used to listen for action events listed in the Action Map.

Inputs

Port Type Description
Enable Any Enables the node
Disable Any Disables the node
Action String Action to trigger
Action Map String Action map to use
NonDevMode Boolean When set to true, can be used in non dev mode as well

Outputs

Port Type Description
Pressed String Triggers when the action is pressed
Released String Triggers when the action is released

ActionMapManager node

Used to enable or disable the Action Map input.

Inputs

Port Type Description
Enable Any Enables the node
Disable Any Disables the node
Action Map String Name of the action map to use

Gestures nodes

This group of nodes is used to handle finger taps, swipes, and other gestures as input.

Gestures:ClickOrTap node

Used to recognize one or more mouse clicks or finger taps.

Inputs

Port Type Description
Enable Any Enables the node
Disable Any Disables the node
PointerIndex Integer Pointer (button or finger) index to track
MinClicksOrTaps Integer Minimum number of clicks or taps required for the gesture to be recognized
MaxSecondsHeld Float Maximum number of seconds allowed while held before the gesture stops being recognized
MaxPixelsMoved Float Maximum distance in pixels allowed to move while held before the gesture stops being recognized
MaxSecondsBetweenClicksOrTaps Float Maximum number of seconds allowed between clicks or taps
MaxPixelsBetweenClicksOrTaps Float Maximum distance in pixels allowed between clicks or taps

Outputs

Port Type Description
Recognized Any Triggers when a discrete number of clicks or taps is recognized
StartX Float X-axis screen position of the click or tap start
StartY Float Y-axis screen position of the click or tap start
EndX Float X-axis screen position of the click or tap end
EndY Float Y-axis screen position of the click or tap end

Gestures:Drag node

Used to recognize finger drag gestures.

Inputs

Port Type Description
Enable Any Enables the node
Disable Any Disables the node
PointerIndex Integer Pointer (button or finger) index to track
MinSecondsHeld Float Mimimum number of seconds after the initial press before a drag is recognized
MinPixelsMoved Float Mimimum distance in pixels before a drag is recognized

Outputs

Port Type Description
Initiated Any Activated when a continuous drag gesture is initiated
Updated Any Activated when a continuous drag gesture is updated
Ended Any Activated when a continuous drag gesture has ended
StartX Float X-axis screen position of the drag start
StartY Float X-axis screen position of the drag start
CurrentX Float Current x-axis screen position of the drag
CurrentY Float Current y-axis screen position of the drag
DeltaX Float Number of pixels dragged on the x-axis screen
DeltaY Float Number of pixels dragged on the y-axis screen
Distance Float Number of pixels dragged on screen

Gestures:Hold node

Used to recognize finger hold gestures.

Inputs

Port Type Description
Enable Any Enables the node
Disable Any Disables the node
PointerIndex Integer The button or finger index to track
MinSecondsHeld Float Mimimum number of seconds before a hold is recognized
MaxPixelsMoved Float Mimimum distance in pixels before a hold is recognized

Outputs

Port Type Description
Initiated Any Activated when a continuous hold gesture is initiated
Updated Any Activated when a continuous hold gesture is updated
Ended Any Activated when a continuous hold gesture has ended
StartX Float X-axis screen position of the hold start
StartY Float Y-axis screen position of the hold start
CurrentX Float Current x-axis screen position of the hold
CurrentY Float Current y-axis screen position of the hold
Duration Float Duration of the hold in seconds

Gestures:Pinch node

Used to recognize finger pinch (away from or toward) gestures.

Inputs

Port Type Description
Enable Any Enables the node
Disable Any Disables the node
MinPixelsMoved Float Mimimum distance in pixels before a pinch is recognized
MaxAngleDegrees Float Maximum angle in degrees that pinch can deviate before it is recognized

Outputs

Port Type Description
Initiated Any Activated when a continuous pinch gesture is initiated
Updated Any Activated when a continuous pinch gesture is updated
StartMidpointX Any Midpoint x-axis position of the pinch
StartMidpointY Float Midpoint y-axis position of the pinch
StartDistance Float Pixel distance between the two touch positions when the pinch is started
CurrentMidpointX Float Current x-axis position of the pinch
CurrentMidpointY Float Current y-axis position of the pinch
CurrentDistance Float Current distance in pixels between the two touch positions
Ratio Float Ratio of the pinch (CurrentDistance/StartDistance)

Gestures:Rotate node

Used to recognize finger rotation (movement in a circle around each other) gestures.

Inputs

Port Type Description
Enable Any Enables the node
Disable Any Disables the node
MaxPixelsMoved Float Maximum distance in pixels before a rotation is recognized
MinAngleDegrees Float Minimum angle in degrees before a rotation is recognized

Outputs

Port Type Description
Initiated Any Activated when a continuous rotation gesture is initiated
Updated Any Activated when a continuous rotation gesture is updated
Ended Any Activated when a continuous rotation gesture has ended
StartMidpointX Float X-axis screen position where the rotation started
StartMidpointY Float Y-axis screen position where the rotation started
StartDistance Float Pixel distance between the two touch positions when the rotation started
CurrentMidpointX Float Current x-axis screen position of the rotation
CurrentMidpointY Float Current y-axis screen position of the rotation
CurrentDistance Float Current pixel distance between the two touch positions
RotationDegrees Float Current rotation in degrees

Gestures:Swipe node

Used to recognize finger swipe gestures.

Inputs

Port Type Description
Enable Any Enables the node
Disable Any Disables the node
PointerIndex Integer The button or finger index to track
MaxSecondsHeld Float Maximum number of seconds for a swipe to be recognized
MinPixelsMoved Float Mimimum distance in pixels before a swipe is recognized

Outputs

Port Type Description
Recognized Any Activated when a continuous swipe gesture is recognized
StartX Float X-axis screen position where the swipe started
StartY Float Y-axis screen position where the swipe started
EndX Float X-axis screen position where the swipe ended
EndY Float Y-axis screen position where the swipe ended
DeltaX Float X-axis pixels swiped
DeltaY Float Y-axis pixels swiped
DirectionX Float X-axis direction of the swipe
DirectionY Float Y-axis direction of the swipe
Distance Float Distance of the swipe in pixels
Duration Float Duration of the swipe in seconds
Velocity Float Velocity of the swipe in pixels per second

MotionSensor nodes

This group of nodes are used with a motion sensor or accelerometer input.

MotionSensor:AccelerationGravity node

Used to output gravity-generated acceleration.

Inputs

Port Type Description
Enable Any Enables the node
Disable Any Disables the node

Outputs

Port Type Description
SensorData Vec3 Outputs raw gravity acceleration in g-forces
IsSensorDataAvailable Boolean Outputs true or false when the node is activated

MotionSensor:AccelerationRaw node

Used to output raw acceleration.

Inputs

Port Type Description
Enable Any Enables the node
Disable Any Disables the node

Outputs

Port Type Description
SensorData Vec3 Outputs raw sensor acceleration in g-forces
IsSensorDataAvailable Boolean Outputs true or false when the node is activated

MotionSensor:AccelerationUser node

Used to output user-generated acceleration.

Inputs

Port Type Description
Enable Any Enables the node
Disable Any Disables the node

Outputs

Port Type Description
SensorData Vec3 Outputs user-generated acceleration in g-forces
IsSensorDataAvailable Boolean Outputs true or false when the node is activated

MotionSensor:MagneticFieldRaw node

Used to output raw magnetic field data as measured by a magnetometer. Includes device bias.

Inputs

Port Type Description
Enable Any Enables the node
Disable Any Disables the node

Outputs

Port Type Description
SensorData Vec3 Outputs raw magnetic field in microteslas
IsSensorDataAvailable Boolean Outputs true or false when the node is activated

MotionSensor:MagneticFieldUnbiased node

Used to output magnetic field data as measured by a magnetometer. Processed to remove device bias.

Inputs

Port Type Description
Enable Any Enables the node
Disable Any Disables the node

Outputs

Port Type Description
SensorData Vec3 Outputs unbiased magnetic field data in microteslas
IsSensorDataAvailable Boolean Outputs true or false when the node is activated

MotionSensor:MagneticNorth node

Used to output a vector pointing to magnetic north.

Inputs

Port Type Description
Enable Any Enables the node
Disable Any Disables the node

Outputs

Port Type Description
SensorData Vec3 Outputs a vector pointing to magnetic north
IsSensorDataAvailable Boolean Outputs true or false when the node is activated

MotionSensor:Orientation node

Used to measure the orientation or attitude of the device from an arbitrary but constant frame of reference.

Inputs

Port Type Description
Enable Any Enables the node
Disable Any Disables the node

Outputs

Port Type Description
SensorData Vec3 Outputs an orientation or attitude angle in degrees
IsSensorDataAvailable Boolean Outputs true or false when the node is activated

MotionSensor:OrientationDelta node

Used to measure the change in orientation or attitude of the device since the last measurement.

Inputs

Port Type Description
Enable Any Enables the node
Disable Any Disables the node

Outputs

Port Type Description
SensorData Vec3 Outputs an orientation or attitude angle in degrees
IsSensorDataAvailable Boolean Outputs true or false when the node is activated

MotionSensor:RotationRateRaw node

Used to output the raw rotation rate as measured by the gyroscope.

Inputs

Port Type Description
Enable Any Enables the node
Disable Any Disbles the node

Outputs

Port Type Description
SensorData Vec3 Outputs the raw gyroscope rotation rate in degrees per second
IsSensorDataAvailable Boolean Outputs true or false when the node is activated

MotionSensor:RotationRateUnbiased node

Used to output the rotation rate as measured by the gyroscope and processed to remove device bias.

Inputs

Port Type Description
Enable Any Enables the node
Disable Any Disables the node

Outputs

Port Type Description
SensorData Vec3 Outputs an unbiased rotation rate in degrees per second
IsSensorDataAvailable Boolean Outputs true or false when the node is activated

MouseButtonInfo node

Used to output mouse button state information.

Inputs

Port Type Description
Enable Any Enables the node
Disable Any Disables the node
MouseButton Boolean Mouse button state information
MouseWheel Boolean Mouse wheel state information

Outputs

Port Type Description
MousePressed Integer Outputs the mouse button that was pressed
MouseReleased Integer Outputs the mouse button that was released
MouseWheel Float Outputs a positive value when the mouse wheel is moved up and a negative value when moved down

MouseCoords node

Used to output mouse coordinates.

Inputs

Port Type Description
Enable Any Enables the node
Disable Any Disables the node
World Boolean World coordinates used
Screen Boolean Screen coordinates of the mouse cursor
Delta Boolean Shows the number of screen pixels the mouse cursor has moved

Outputs

Port Type Description
World Vec3 World coordinates of the mouse cursor
ScreenX Integer X-axis coordinate of mouse cursor
ScreenY Integer Y-axis coordinate of mouse cursor
DeltaScreenX Integer X-axis delta coordinate of mouse cursor
DeltaScreenY Integer Y-axis delta coordinate of mouse cursor

MouseCursor node

Used to show or hide the mouse cursor.

Inputs

Port Type Description
Show Any Shows the mouse cursor
Hide Any Hides the mouse cursor

Outputs

Port Type Description
Done Any Triggers when the action is complete

MouseEntitiesInBox node

Used to show or hide the mouse coordinates.

Inputs

Port Type Description
Get Any Get the mouse cursor
ContainerId Integer ID of the container that stores the entities
ScreenX Integer X-axis screen position of the mouse cursor
ScreenY Integer Y-axis screen position of the mouse cursor
ScreenX2 Integer X-axis screen position 2 of the mouse cursor
ScreenY2 Integer Y-axis screen position 2 of the mouse cursor

Outputs

Port Type Description
Done Any Triggers when completed

MouseRayCast node

Used to output the mouse raycast information.

Inputs

Port Type Description
Enable Any Enables the node
Disable Any Disables the node
All Integer Raycast filter type
EntitiesToIgnore Integer Entities to ignore during raycast
IgnoreBackFaces Boolean Ignore backfaces of geometry during raycast

Outputs

Port Type Description
HitPos Vec3 Coordinates of the first position that was hit with the raycast
HitNormal Vec3 Normal of the first position that was hit with the raycast
EntityId Any ID of the entity that was hit by the raycast
NoHit Any Activated each frame when enabled and no item was hit by the raycast

MouseSetPos node

Used to position the mouse at the specified location when activated.

Inputs

Port Type Description
In Any Activates the node
Coords Vec3 Coordinates to set the mouse at

Outputs

Port Type Description
Out Any Triggers when the new mouse position is set

Touch:MultiTouchEvent node

Used to output finger touch location.

Inputs

Port Type Description
Enable Any Enables the node
Disable Any Disables the node

Outputs

Port Type Description
TouchDown Integer Finger (touch) ID that was pressed
TouchUp Integer Finger (touch) ID that was released

Touch:TouchEvent node

Used to output finger touch location.

Inputs

Port Type Description
Enable Any Enables the node
Disable Any Disables the node
TouchId Integer Touch (finger) ID for which events will be sent from
ScreenCoords Boolean Output screen coordinates
WorldCoords Boolean Output world coordinates

Outputs

Port Type Description
TouchDown Any Finger (touch) ID that was pressed
TouchUp Any Finger (touch) ID that was released
ScreenCoordX Integer Screen x-axis coordinate of the touch
ScreenCoordY Integer Screen y-axis coordinate of the touch
WorldCoords Vec3 Touch position in world coordinates

Touch:MultiTouchCoords node

Used to output the finger touch location from the specified ID.

Inputs

Port Type Description
Enable Any Enables the node
Disable Any Disables the node
TouchId Integer Finger (touch) ID for which the coordinates will obtained

Outputs

Port Type Description
ScreenCoordX Integer X-axis location of the finger touch
ScreenCoordY Integer Y-axis location of the finger touch

Touch:TouchRaycast node

Used to generate a raycast for each finger frame ID.

Inputs

Port Type Description
Enable Any Enables the node
Disable Any Disables the node
All Integer Raycast filter type
EntitiesToIgnore Integer Entities to ignore during raycast
IgnoreBackFaces Boolean Ignore backfaces of geometry during raycast

Outputs

Port Type Description
HitPos Vec3 Coordinates of the first position that was hit with the raycast
HitNormal Vec3 Normal of the first position that was hit with the raycast
EntityId Any ID of the entity that was hit by the raycast
NoHit Any Activated each frame when enabled and no item was hit by the raycast

Touch:VirtualThumbstick node

Used to implement a virtual thumbstick.

Inputs

Port Type Description
Enable Any Enables the node
Disable Any Disables the node
Radius Float Radius of thumbstick pad as a percentage of screen width
ScreenInputArea Integer What side of the screen the thumbstick should accept input from

Outputs

Port Type Description
OutX Float X-axis value of the thumbstick
OutY Float Y-axis value of the thumbstick