Calling an SCNAction from the completion handler of RunAction seems to hang SceneKit.
A touch event or rotating the device seems to unblock the hang.
To reproduc
Using SCNTransaction with a completionBlock does not suffer from the same problem, so this works fine:
SCNTransaction.Begin();
SCNTransaction.AnimationDuration = 3.0f;
SCNTransaction.SetCompletionBlock(() =>
{
Console.WriteLine("DONE ROTATE");
SCNTransaction.Begin();
SCNTransaction.AnimationDuration = 3.0f;
SCNTransaction.SetCompletionBlock(() =>
{
Console.WriteLine("DONE MOVEBY");
});
ship.Position = new SCNVector3(1.0f, 0.0f, 0.0f);
SCNTransaction.Commit();
});
ship.EulerAngles = new SCNVector3(0.0f, (float)Math.PI / 2, 0.0f);
SCNTransaction.Commit();
(Also using CABasicAnimation with CAAnimationDelegate to do the callback works OK.)
Since SCNTransaction and CABasicAnimation work, but RunAction doesn't, it really looks like an Apple bug in RunAction.