I have a node with an SCNPlane
whose corners I project to the image plane. I added an SCNBillboardConstraint
to the node:
// orientation with billboarding
var billboardConstraint = SCNBillboardConstraint()
billboardConstraint.freeAxes = [.Y]
labelSpriteNode.constraints = [billboardConstraint]
I am very surprised to see that this particular node's worldOrientation
or orientation
is not changed when I print it on every frame, despite me confirming visually that the orientation is truly changing as I move the camera around.
for labelComponent in labelComponents {
if let sprite: SCNNode = labelComponent.childNode(withName: "sprite", recursively: true) {
print("sprite.worldOrientation = \(sprite.worldOrientation)")
print("sprite.orientation = \(sprite.orientation)")
}
}
results with no changes:
sprite.worldOrientation = SCNVector4(x: 0.02127575, y: 0.1855893, z: -0.006851348, w: 0.9823732)
sprite.orientation = SCNVector4(x: 0.0, y: 0.0, z: 0.0, w: 1.0)
sprite.worldOrientation = SCNVector4(x: 0.02127575, y: 0.1855893, z: -0.006851348, w: 0.9823732)
sprite.orientation = SCNVector4(x: 0.0, y: 0.0, z: 0.0, w: 1.0)
sprite.worldOrientation = SCNVector4(x: 0.02127575, y: 0.1855893, z: -0.006851348, w: 0.9823732)
sprite.orientation = SCNVector4(x: 0.0, y: 0.0, z: 0.0, w: 1.0)
sprite.worldOrientation = SCNVector4(x: 0.02127575, y: 0.1855893, z: -0.006851348, w: 0.9823732)
sprite.orientation = SCNVector4(x: 0.0, y: 0.0, z: 0.0, w: 1.0)
sprite.worldOrientation = SCNVector4(x: 0.02127575, y: 0.1855893, z: -0.006851348, w: 0.9823732)
sprite.orientation = SCNVector4(x: 0.0, y: 0.0, z: 0.0, w: 1.0)