<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/EntityRotationGestureRecognizer",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "c:@M@RealityKit@objc(cs)EntityRotationGestureRecognizer"
  },
  "title" : "EntityRotationGestureRecognizer"
}
-->

# EntityRotationGestureRecognizer

A gesture recognizer that uses rotation gestures involving two touches to rotate a given entity.

```
@MainActor @objc @preconcurrency class EntityRotationGestureRecognizer
```

## Topics

### Creating a recognizer

[`init(target: Any?, action: Selector?)`](/documentation/RealityKit/EntityRotationGestureRecognizer/init(target:action:))

### Using the recognizer

[`var entity: (any HasCollision)?`](/documentation/RealityKit/EntityRotationGestureRecognizer/entity)

The entity the receiver is associated with

[`func canPrevent(UIGestureRecognizer) -> Bool`](/documentation/RealityKit/EntityRotationGestureRecognizer/canPrevent(_:))

[`func touchesBegan(Set<UITouch>, with: UIEvent)`](/documentation/RealityKit/EntityRotationGestureRecognizer/touchesBegan(_:with:))

Sent to the gesture recognizer when one or more fingers touch down on the associated entity.

## Relationships

### Inherits From

[`UIRotationGestureRecognizer`](/documentation/UIKit/UIRotationGestureRecognizer)

### Conforms To

[`EntityGestureRecognizer`](/documentation/RealityKit/EntityGestureRecognizer)

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

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

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

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

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

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

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

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

---

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)