---
title: "warp(to:duration:)"
framework: spritekit
role: symbol
role_heading: Type Method
path: "spritekit/skaction/warp(to:duration:)"
---

# warp(to:duration:)

Creates an action to distort a node based using an SKWarpGeometry object.

## Declaration

```swift
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.

## Mentioned in

Animate the Warping of a Sprite

## Return Value

Return Value A new action object.

## Discussion

Discussion The numberOfColumns and numberOfRows in the node’s current geometry should match those of the specified geometry.

## See Also

### Animate the Warping of a Node

- [animate(withWarps:times:)](spritekit/skaction/animate(withwarps:times:).md)
- [animate(withWarps:times:restore:)](spritekit/skaction/animate(withwarps:times:restore:).md)
