SceneKit: understanding the pivot property of SCNNode

前端 未结 3 546
梦如初夏
梦如初夏 2021-01-12 19:05

The goal is to increase the length of a SCNBox such that it only grows in the positive-z direction.

This answer suggests playing with the pivot property

3条回答
  •  孤街浪徒
    2021-01-12 19:47

    Sounds like you want to increase the length of the SCNBox(a geometry). So you can simply increase the length property. The answer you mentioned is about the pivot property. As you can see from the doc:

    The pivot point for the node’s position, rotation, and scale.

    For example, by setting the pivot to a translation transform you can position a node containing a sphere geometry relative to where the sphere would rest on a floor instead of relative to its center.

提交回复
热议问题