I know how to create a sequence of SCNActions in a single node, one by one, in SceneKit. But I would like to know, how can I make a sequence of SCNActions with different nodes? For example
- Move forward node A
- Move forward node B
- Wait 1 second
- Move backward node A
I found an example with SpriteKit but I can not use it.
The code of a sequence is as follows
var sequence = [SCNAction] () let force = SCNVector3(0.0, 0.0, -1.0) let move = SCNAction.move(by: force!, duration: 1.5) squence.append(move) let actions = SCNAction.sequence(squence) nodeSelected?.runAction(actions)