<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 10.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ForceFeedback",
  "identifier" : "/documentation/ForceFeedback/FFEFFECT",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Force Feedback"
    ],
    "preciseIdentifier" : "c:@S@FFEFFECT"
  },
  "title" : "FFEFFECT"
}
-->

# FFEFFECT

UsUsed by the FFDeviceCreateEffect method to initialize a new effect object. It is also used by the FFEffectSetParameters and FFEffectGetParameters functions.

```
struct FFEFFECT
```

## Overview

OBJECT IDS cannot be used to identify trigger buttons in **dwTriggerButton**, and output axes in **rgdwAxes[***n***]**. Please use object offsets (FFJOFS_* constants), the only supported method.

## Topics

### Initializers

[`init()`](/documentation/ForceFeedback/FFEFFECT/init())

[`init(dwSize:dwFlags:dwDuration:dwSamplePeriod:dwGain:dwTriggerButton:dwTriggerRepeatInterval:cAxes:rgdwAxes:rglDirection:lpEnvelope:cbTypeSpecificParams:lpvTypeSpecificParams:dwStartDelay:)`](/documentation/ForceFeedback/FFEFFECT/init(dwSize:dwFlags:dwDuration:dwSamplePeriod:dwGain:dwTriggerButton:dwTriggerRepeatInterval:cAxes:rgdwAxes:rglDirection:lpEnvelope:cbTypeSpecificParams:lpvTypeSpecificParams:dwStartDelay:))

### Instance Properties

[`cAxes`](/documentation/ForceFeedback/FFEFFECT/cAxes)

Number of axes involved in the effect.

[`cbTypeSpecificParams`](/documentation/ForceFeedback/FFEFFECT/cbTypeSpecificParams)

Number of bytes of additional type-specific parameters for the corresponding effect type.

[`dwDuration`](/documentation/ForceFeedback/FFEFFECT/dwDuration)

The total duration of the effect, in microseconds. If this value is FF_INFINITE, the effect has infinite duration. If an envelope has been applied to the effect, the attack is applied, followed by an infinite sustain.

[`dwFlags`](/documentation/ForceFeedback/FFEFFECT/dwFlags)

Flags associated with an effect.

[`dwGain`](/documentation/ForceFeedback/FFEFFECT/dwGain)

The gain to be applied to the effect, in the range from 0 through 10,000. The gain is a scaling factor applied to all magnitudes of the effect and its envelope.

[`dwSamplePeriod`](/documentation/ForceFeedback/FFEFFECT/dwSamplePeriod)

The period at which the device should play back the effect, in microseconds.

[`dwSize`](/documentation/ForceFeedback/FFEFFECT/dwSize)

Size, in bytes, of this structure. This member must be initialized before the structure is used.

[`dwStartDelay`](/documentation/ForceFeedback/FFEFFECT/dwStartDelay)

Time (in microseconds) that the device should wait after a FFEffectStart call before playing the effect. If this value is 0, effect playback begins immediately.

[`dwTriggerButton`](/documentation/ForceFeedback/FFEFFECT/dwTriggerButton)

The identifier or offset of the button to be used to trigger playback of the effect. The FFJOFS_* flags must be used to specify the value. If this member is set to FFEB_NOTRIGGER, no trigger button is associated with the effect.

[`dwTriggerRepeatInterval`](/documentation/ForceFeedback/FFEFFECT/dwTriggerRepeatInterval)

The interval, in microseconds, between the end of one playback and the start of the next when the effect is triggered by a button press and the button is held down. Setting this value to FF_INFINITE suppresses repetition.

[`lpEnvelope`](/documentation/ForceFeedback/FFEFFECT/lpEnvelope)

Optional pointer to a FFENVELOPE structure that describes the envelope to be used by this effect. Not all effect types use envelopes. If no envelope is to be applied, the member should be set to NULL.

[`lpvTypeSpecificParams`](/documentation/ForceFeedback/FFEFFECT/lpvTypeSpecificParams)

A pointer to type-specific parameters, or NULL if there are no type-specific parameters.

[`rgdwAxes`](/documentation/ForceFeedback/FFEFFECT/rgdwAxes)

Pointer to a DWORD array (of **cAxes** elements) containing identifiers or offsets identifying the axes to which the effect is to be applied.

[`rglDirection`](/documentation/ForceFeedback/FFEFFECT/rglDirection)

Pointer to a LONG array (of **cAxes** elements) containing either Cartesian coordinates, polar coordinates, or spherical coordinates.

## Relationships

### Conforms To

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)