Force Feedback Lab

  1. Load Force Feedback effects file:

     

  2. Assign effects:
    Effect Index Effect Name Assign effect to
    0
    1
    2
    3
    4
    5

What's Happening

The Web Driver now allows you to use the force feedback features of attached controllers. To enable force feedback, a .ffe file is needed (created with fedit.exe, a tool available in the Web Driver and DirectX SDKs. This file is read with loadEffectsFile(), after first being loaded as a WTFile object.

Once the file is loaded, you can play effects from the file by index from within your code, or assign the effects to play automatically when a joystick button is pressed.

To use the lab above, specify the location of an .ffe file (or use the default) and click Load. The names of the first four effects saved in the file will appear in the Effect Name column of the table above. Then, you can either play the effects with the buttons in the table, or assign the effects to joystick buttons or collision events within the Web Driver scene. To trigger collision events, fly the ship into the sides of the cube using your joystick.

Key Methods Used

WTJoystick::loadEffectsFromFile, WTJoystick::getEffectName, WTJoystick::startEffect, WTJoystick::startEffectOnButton, WTJoystick::stopEffectOnButton

Points to Remember