我有一个带有def get_absolute_url(self):
return reverse("products:product_detail",kwargs={"id":self.id})
的节点,该节点的角我投影到图像平面。我向节点添加了SCNPlane
:
SCNBillboardConstraint
我很惊讶地看到,当我在每帧上打印该特定节点的// orientation with billboarding
var billboardConstraint = SCNBillboardConstraint()
billboardConstraint.freeAxes = [.Y]
labelSpriteNode.constraints = [billboardConstraint]
或worldOrientation
时都没有改变,尽管我已经目视确认在移动相机时方向确实发生了变化周围。
orientation
结果无变化:
for labelComponent in labelComponents {
if let sprite: SCNNode = labelComponent.childNode(withName: "sprite", recursively: true) {
print("sprite.worldOrientation = \(sprite.worldOrientation)")
print("sprite.orientation = \(sprite.orientation)")
}
}