I want to do the following on a node which is a simple sphere, without a physicsbody, created in the scenekit editor :
let ScaleDown = SCNAction.scale(to: 0, duration: 1)
let ScaleUp = SCNAction.scale(to: 0.4, duration: 2)
let Move = SCNAction.move(to: SCNVector3.init(InitialCharacterGridCoordinates.x, 0, InitialCharacterGridCoordinates.y), duration: 0)
CharacterNode.runAction(SCNAction.sequence([ScaleDown, Move, ScaleUp]))
The problem is that the Move action doesn't do anything. However if I do as below it works :
CharacterNode.runAction(SCNAction.sequence([Move, ScaleDown, ScaleUp]))
I have also tried with all types of physicsbody, it does not work neither. It seems that as soon as a scale action is executed, the move action is not working, when in a sequence. Outside of a sequence, like below it is working but not really clean code.
CharacterNode.runAction(ScaleDown, completionHandler: { self.CharacterNode.runAction(Move, completionHandler: { self.CharacterNode.runAction(ScaleUp) }) })
Any idea why the sequence of action does not work ?
J.