<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SpriteKit",
  "identifier" : "/documentation/SpriteKit/SKAction/warp(to:duration:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "SpriteKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SKAction(cm)warpTo:duration:"
  },
  "title" : "warp(to:duration:)"
}
-->

# warp(to:duration:)

Creates an action to distort a node based using an [`SKWarpGeometry`](/documentation/SpriteKit/SKWarpGeometry) object.

```
class func warp(to warp: SKWarpGeometry, duration: TimeInterval) -> SKAction?
```

## Parameters

`warp`

The warp geometry to distort the node to.

`duration`

The duration of the animation.

## Return Value

A new action object.

## Discussion

The [`numberOfColumns`](/documentation/SpriteKit/SKWarpGeometryGrid/numberOfColumns) and [`numberOfRows`](/documentation/SpriteKit/SKWarpGeometryGrid/numberOfRows) in the node’s current geometry should match those of the specified geometry.

---

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)