---
title: SCNTransformConstraint
framework: scenekit
role: symbol
role_heading: Class
path: scenekit/scntransformconstraint
---

# SCNTransformConstraint

A constraint that runs a specified closure, block in Objective-C, to compute a new transform (position, rotation, and scale) for each node that the constraint affects.

## Declaration

```swift
class SCNTransformConstraint
```

## Overview

Overview To attach constraints to an SCNNode object, use its constraints property. When Scene Kit prepares to render a scene, it evaluates the list of constraints attached to each node to determine the transformation for that node, then applies the new transformation before rendering. To evaluate a transform constraint, Scene Kit runs the block you provided when creating the constraint. In this block, your app computes a new transformation to be applied to the node. Optionally, your app may reference the node’s current transformation in computing the new transformation.

## Topics

### Creating a Transform Constraint

- [init(inWorldSpace:with:)](scenekit/scntransformconstraint/init(inworldspace:with:).md)

### Initializers

- [init(inWorldSpace:withBlock:)](scenekit/scntransformconstraint/init(inworldspace:withblock:).md)

### Type Methods

- [orientationConstraint(inWorldSpace:with:)](scenekit/scntransformconstraint/orientationconstraint(inworldspace:with:).md)
- [positionConstraint(inWorldSpace:with:)](scenekit/scntransformconstraint/positionconstraint(inworldspace:with:).md)

## Relationships

### Inherits From

- [SCNConstraint](scenekit/scnconstraint.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)
- [SCNAnimatable](scenekit/scnanimatable.md)
