Lumberyard
Legacy Reference

Force Feedback 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.

Lumberyard uses the force feedback system to manage haptic feedback for motion controllers. You can use the force feedback nodes to configure haptic feedback settings.

Game:ForceFeedbackSetDeviceIndex

Sets the device ID for force feedback effects.

Node Inputs

DeviceIndex

Enables or disables the force feedback functionality.

Valid values: 0 = Enable | -1 = Disable

Game:ForceFeedback

Controls the force feedback effect with an effect that is specified in the ForceFeedbackEffects.xml file (located in the \libs\GameForceFeedback directory).

The following is an example ForceFeedbackEffects.xml file with right_shoot and left_shoot effects added:

<ForceFeedback> <Patterns> <!-- Pattern definition accepts from 1 to 16 samples --> <Pattern name="100" samples="1" /> <Pattern name="75" samples="0.75" /> <Pattern name="50" samples="0.5" /> <Pattern name="30" samples="0.3" /> <Pattern name="20" samples="0.2" /> <Pattern name="12" samples="0.12" /> </Patterns> <Envelopes> <!-- Envelope definition accepts from 1 to 8 samples --> <Envelope name="linearFalloff" samples="1,0" /> <Envelope name="cosineFalloff" samples="1,0.98,0.92,0.83,0.69,0.54,0.25,0" /> <Envelope name="constant" samples="1" /> </Envelopes> <Effects> <Effect name="small_rumble" time="1.0" > <MotorAB frequency="1" pattern="100" envelope="linearFalloff" /> </Effect> <Effect name="small_pulse" time="0.05" > <MotorA frequency="1" pattern="20" envelope="cosineFalloff" /> <MotorB frequency="1" pattern="20" envelope="cosineFalloff" /> </Effect> <Effect name="medium_pulse" time="0.12" > <MotorA frequency="1" pattern="20" envelope="cosineFalloff" /> <MotorB frequency="1" pattern="50" envelope="cosineFalloff" /> </Effect> <Effect name="heavy_recoil" time="0.2" > <MotorA frequency="1" pattern="50" envelope="cosineFalloff" /> <MotorB frequency="1" pattern="50" envelope="cosineFalloff" /> </Effect> <Effect name="big_recoil" time="0.5" > <MotorA frequency="1" pattern="75" envelope="linearFalloff" /> <MotorB frequency="1" pattern="75" envelope="linearFalloff" /> </Effect> <Effect name="weak" time="0.5" > <MotorAB frequency="1" pattern="12" envelope="linearFalloff" /> </Effect> <Effect name="medium" time="0.5" > <MotorB frequency="1" pattern="50" envelope="linearFalloff" /> </Effect> <Effect name="strong" time="0.5" > <MotorAB frequency="1" pattern="100" envelope="linearFalloff" /> </Effect> <Effect name="right_shoot" time="0.1" > <MotorA frequency="1" pattern="50" envelope="cosineFalloff" /> </Effect> <Effect name="left_shoot" time="0.5" > <MotorB frequency="1" pattern="50" envelope="cosineFalloff" /> </Effect> </Effects> </ForceFeedback>

Node Inputs

Effect Name

Select the effect to use from the Effect Name drop-down list.

Play

Plays the force feedback effect.

Intensity

Applies the intensity factor to the effect being played.

Default value: 1

Delay

Time delay to start the effect.

Default value: 0

Stop

Stops the force feedback effect.

StopAll

Stops all force feedback effects.

Input Device Type

Specifies the input device to which to send force feedback.

Default value: Gamepad

Valid values: Gamepad | Joystick | Keyboard | MotionController | MotionSensor | Mouse | TouchScreen

Note

MotionController uses Left, LowPass, and MotorA terminology for the Left Controller. It uses Right, HighPass, and MotorB terminology for the Right Controller.

Game:ForceFeedbackTriggerTweaker

Controls the force feedback effect on the left and right triggers.

Node Inputs

LeftTouchToActivate

The left trigger's gain is modulated by how much the trigger is pressed.

Default value: 1

LeftGain

Gain sent to the left trigger's motor.

Default value: 1

LeftEnvelope

Envelope sent to the left trigger's motor.

Default value: 1

Valid values: 0 - 2000 (in multiples of 4)

RightTouchToActivate

The right trigger's gain is modulated by how much the trigger is pressed.

Default value: 1

RightGain

Gain sent to the right trigger's motor.

Default value: 1

RightEnvelope

Envelope sent to the right trigger's motor.

Default value: 1

Valid values: 0 - 2000 (in multiples of 4)

Activate

Activates the effect on the left and right triggers.

Deactivate

Deactivates the effect on the left and right triggers.

Input Device Type

Specifies the input device to which to send force feedback.

Default value: Gamepad

Valid values: Gamepad | Joystick | Keyboard | MotionController | MotionSensor | Mouse | TouchScreen

Note

MotionController uses Left, LowPass, and MotorA terminology for the Left Controller. It uses Right, HighPass, and MotorB terminology for the Right Controller.

Game:ForceFeedbackTweaker

Controls individual high or low frequency force feedback effects.

Node Inputs

LowPass

Applies the multiplier to the low frequency effect being played.

Default value: 1

HighPass

Applies the multiplier to the high frequency effect being played.

Default value: 1

Activate

Activates the high or low frequency force feedback effect.

Deactivate

Deactivates the high or low frequency force feedback effect.

Input Device Type

Specifies the input device to which to send force feedback.

Default value: Gamepad

Valid values: Gamepad | Joystick | Keyboard | MotionController | MotionSensor | Mouse | TouchScreen

Note

MotionController uses Left, LowPass, and MotorA terminology for the Left Controller. It uses Right, HighPass, and MotorB terminology for the Right Controller.