Skip to content
Tangent 128 edited this page Mar 28, 2015 · 3 revisions

HapticEffect

  • HapticEffect
    • Table
      • SYNOPSIS
      • FIELDS
        • Constant
        • Sine, Square, Triangle, SawToothUp, SawToothDown
        • Spring, Damper, Inertia, Friction
        • Ramp
        • LeftRight

The effect description. The table is used for every effect type defined in SDL.hapticType.

Table

SYNOPSIS

local effect = {
type
    ...

FIELDS

  • type, the type of effect (see SDL.hapticType)
  • ..., the other fields depending on the type, see below

Constant

  • length, duration
  • delay, delay before starting the effect
  • button, the button that trigger the effects
  • interval, how soon it can be triggered again after button
  • level, the level
  • attackLength, the attack length
  • attackLevel, the attack level
  • fadeLength, the fade length
  • fadeLevel, the fade level
  • direction, the direction (see HapticDirectionType)

Sine, Square, Triangle, SawToothUp, SawToothDown

  • length, duration
  • delay, delay before starting the effect
  • button, the button that trigger the effects
  • interval, how soon it can be triggered again after button
  • period, wave period
  • magnitude, peak value
  • offset, mean value of the wave
  • phase, horizontal shift given by hundredths of a cycle
  • attackLength, the attack length
  • attackLevel, the attack level
  • fadeLength, the fade length
  • fadeLevel, the fade level
  • direction, the direction (see HapticDirectionType)

Spring, Damper, Inertia, Friction

  • length, duration
  • delay, delay before starting the effect
  • button, the button that trigger the effects
  • interval, how soon it can be triggered again after button
  • rightSat, a sequence of 3 numbers for the level when joystick is positive side
  • leftSat, a sequence of 3 numbers for the level when joystick is positive side
  • rightCoeff, a sequence of 3 numbers for how fast to increase the force towards the positive side
  • leftCoeff, a sequence of 3 numbers for how fast to increase the force towards the negative side
  • deadband, a sequence of 3 numbers for the size of the dead band
  • center, a sequence of 3 numbers for position of the dead zone

Ramp

  • length, duration
  • delay, delay before starting the effect
  • button, the button that trigger the effects
  • interval, how soon it can be triggered again after button
  • start, the beginning strength level
  • end, the end stength level
  • attackLength, the attack length
  • attackLevel, the attack level
  • fadeLength, the fade length
  • fadeLevel, the fade level
  • direction, the direction (see HapticDirectionType)

LeftRight

  • length, duration
  • largeMagnitude, control of the large controller motor
  • smallMagnitude, control of the small controller motor
Clone this wiki locally