2017-05-19 3 views

Antwort

0

SCNNode Position ist ein SCNVector3

// Storing the position of myNode node into nodePosition variable 
SCNVector3 nodePosition = myNode.position; 

Allerdings, wenn es eine Animation oder Physik Simulation .position Eigenschaften der beteiligten Knoten nicht aktualisiert zu spielen.

Stattdessen sollten Sie .presentationNode Eigenschaft für die aktuelle Position gelesen:

// Getting the current position of myNode 
// if an animation or physics simulation is in progress 
SCNVector3 nodePosition = myNode.presentationNode.position;