I was wondering if anyone knew if you perform a SCNAction on a node, is there a way while that node is executing the action, where you could find out what position it's in the scenes coordinate system?
Lets say I have two SCNNodes A and B...
SCNNode *A, *B;
and I want to run a SCNAction for A
A.position = SCNVector3Make(0.0,0.0,0.0);
[A runAction:[SCNAction moveTo:SCNVector3Make(10.0,0.0,0.0)]];
and while A was running its action, have B follow it in real time?
[B runAction:[SCNAction repeatActionForever:[SCNAction moveTo:A.position]]];
So every time B repeats its given a new updated position of A to move to.
The problem I'm getting is, even if I set the presentationNode of A to the SCNAction above, It's still returning the initial input that I set (which makes sense) but how do I get the updated position of A?
Side Note: When I take A.presentationNode.position I get the default Zero Vector
SOLVED QUESTION
After further research, I found out how to use the SCNSceneRendererDelegate and then created a (void) method which updated the position of node A and then within the same method I had a SCNAction which moved B to the update position of A.
If anyone had a similar issue or would just like to see the code, let me know and I'll post it!