<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameController",
  "identifier" : "/documentation/GameController/GCDeviceHaptics/createEngine(withLocality:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Game Controller"
    ],
    "preciseIdentifier" : "c:objc(cs)GCDeviceHaptics(im)createEngineWithLocality:"
  },
  "title" : "createEngine(withLocality:)"
}
-->

# createEngine(withLocality:)

Creates a haptics engine with the specified locality.

```
func createEngine(withLocality locality: GCHapticsLocality) -> CHHapticEngine?
```

## Parameters

`locality`

The location of the haptics on the controller.

## Return Value

A new haptics engine with the specified locality.

## Discussion

If you create an engine using the [`default`](/documentation/GameController/GCHapticsLocality/default) location, users have the expected haptic experience. For example, the engine uses the handle accuators. If you want to create different experiences, such as using the left handle actuator as a woofer and the right actuator as a tweeter, create one or more engines with different localities.

---

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)