SCNNode 未出现在正确位置 [英] SCNNode is not appearing in correct position
问题描述
我从 Google Blocks 下载了 wall2.obj
文件,然后我使用 Blender 将扩展名更改为 .dae
墙节点没有出现在它应该出现的位置.
I downloaded the wall2.obj
file from Google Blocks and then I used Blender to change the extension to .dae
the wall node is not appearing where it should be.
墙节点的放置位置与应该放置的位置:
Where the wall node placed vs. where it should be placed:
推荐答案
这是模型的枢轴点问题
在 Blender 中,将 枢轴点
的位置更改为所需的位置 - 将枢轴点移动到模型的中心,然后移动到其底部.如果您的模型由多个独立部分组成,请将所有部分分组并仅使用一个 复合枢轴点.
It's a model's pivot point issue
In Blender change a pivot point
's position to the desired one – move pivot point to the center of your model, and then at its bottom. If your model consists of several independent parts, group all parts and use just one composite pivot point.
或者您可以在代码中使用 simdPivot
实例属性以编程方式移动枢轴:
Or you can use simdPivot
instance property in you code to move a pivot programmatically:
brickWallNode.simdPivot.columns.3.x = -0.5
这篇关于SCNNode 未出现在正确位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!