Latest 1.2.0
License MIT
Platforms ios 12.0
Frameworks SceneKit


I noticed that there was no nice way (to my knowledge) in SceneKit of animating a Node along a curved path.

Swift 5.0
Build Status

Include this pod in your project:
pod 'SCNBezier'

Using this framework you can animate a Node along a bézier path using the following example code:

    let myNode = SCNNode(geometry: SCNBox(width: 0.1, height: 0.1, length: 0.1, chamferRadius: 0))
    let bezPositions = [SCNVector3(-1, 1, 0.01),
                        SCNVector3(1, 0.5, 0.4),
                        SCNVector3(1.0, -1, 0.1),
                        SCNVector3(0.4, -0.5, 0.01)]
    myNode.runAction(SCNAction.moveAlong(points: bezPositions, duration: 3, fps: 12))

The animation will use duration * fps points to animated between. This does not mean it will not be smooth, it just means it will make the curve out of that many points, so in this example it will use 36 points along the bézier curve.

Bézier example

Latest podspec

    "name": "SCNBezier",
    "version": "1.2.0",
    "summary": "SCNBezier allows users to animate objects along 3D bu00e9zier curves.",
    "description": "SCNBezier allows users to animate objects along bu00e9zier curves.nAny number of points can be used for the bu00e9zier curves, not limited to just quadratic or cubic",
    "homepage": "",
    "license": "MIT",
    "authors": "Max Cobb",
    "source": {
        "git": "",
        "tag": "1.2.0"
    "platforms": {
        "ios": "12.0"
    "swift_versions": "5.0",
    "frameworks": "SceneKit",
    "source_files": "SCNBezier/*.swift"

Pin It on Pinterest

Share This