问题
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:
回答1:
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.
Or you can use simdPivot
instance property in you code to move a pivot programmatically:
brickWallNode.simdPivot.columns.3.x = -0.5
回答2:
An alternate solution for Xcode users is creating a parent node for that object and then move the object node relative to the parent node you have created.
来源:https://stackoverflow.com/questions/61984938/scnnode-is-not-appearing-in-correct-position