gpt4 book ai didi

ios - 在 ARSCNView 中平移和旋转特定节点

转载 作者:塔克拉玛干 更新时间:2023-11-02 07:54:00 24 4
gpt4 key购买 nike

我在 ARSCNView 中添加节点作为子节点和克隆节点,具体取决于我从菜单中选择的内容。该对象放置在我点击屏幕的位置。如何平移和缩放特定节点。

最佳答案

使用transform SCNNode 的属性:

The transformation is the combination of the node’s rotation ,position , and scale properties. The default transformation isSCNMatrix4Identity.

When you set the value of this property, thenode’s rotation, orientation, eulerAngles, position, and scaleproperties automatically change to match the new transform, and viceversa. SceneKit can perform this conversion only if the transform youprovide is a combination of rotation, translation, and scaleoperations. If you set the value of this property to a skewtransformation or to a nonaffine transformation, the values of theseproperties become undefined. Setting a new value for any of theseproperties causes SceneKit to compute a new transformation, discardingany skew or nonaffine operations in the original transformation. Youcan animate changes to this property’s value. See Animating SceneKitContent.

或者你可以使用:

关于ios - 在 ARSCNView 中平移和旋转特定节点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45205389/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com