---
title: "follow(_:speed:)"
framework: spritekit
role: symbol
role_heading: Type Method
path: "spritekit/skaction/follow(_:speed:)"
---

# follow(_:speed:)

Creates an action that moves the node along a relative path at a specified speed, orienting the node to the path.

## Declaration

```swift
class func follow(_ path: CGPath, speed: CGFloat) -> SKAction
```

## Parameters

- `path`: A Core Graphics path whose coordinates are relative to the node’s current position.
- `speed`: The speed at which the node should move, in points per second.

## Return Value

Return Value A new action object.

## Discussion

Discussion Calling this method is equivalent to calling the follow(_:asOffset:orientToPath:speed:) method, passing in true to both the offset and orient parameters. This action is reversible; the resulting action creates and then follows a reversed path with the same speed.

## See Also

### Animating a Node’s Position Along a Custom Path

- [follow(_:duration:)](spritekit/skaction/follow(_:duration:).md)
- [follow(_:asOffset:orientToPath:duration:)](spritekit/skaction/follow(_:asoffset:orienttopath:duration:).md)
- [follow(_:asOffset:orientToPath:speed:)](spritekit/skaction/follow(_:asoffset:orienttopath:speed:).md)
