---
title: "createEngine(withLocality:)"
framework: gamecontroller
role: symbol
role_heading: Instance Method
path: "gamecontroller/gcdevicehaptics/createengine(withlocality:)"
---

# createEngine(withLocality:)

Creates a haptics engine with the specified locality.

## Declaration

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

## Parameters

- `locality`: The location of the haptics on the controller.

## Return Value

Return Value A new haptics engine with the specified locality.

## Discussion

Discussion If you create an engine using the 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.

## See Also

### Creating a haptics engine

- [GCHapticDurationInfinite](gamecontroller/gchapticdurationinfinite.md)
