unity, change parent and keep localPosition or worlPosition
2015-08-07 15:16
543 查看
node.parent=othernode等价于node.setParent(othernode,true),是保持世界坐标不变。
node.setParent(othernode,false)则可以实现保持node的局部坐标不变。
参考:http://tieba.baidu.com/p/4397079815
node.setParent(othernode,false)则可以实现保持node的局部坐标不变。
参考:http://tieba.baidu.com/p/4397079815
相关文章推荐
- Unity取消默认打开上次工程
- unity, access sprite of UGUI Image
- unity, UGUI Text outline
- unity, sprite atlas
- Unity3D合并着色器
- Unity随机Prefab,自动前往某点处理
- Unity随机Prefab,自动前往某点处理
- Unity PlayerPrefs 保存本地持久化数据
- Unity Singleton 单例类(Unity3D开发之二十)
- Unity Singleton 单例类(Unity3D开发之二十)
- Unity安卓打包
- unity3d 雪与沙的渲染
- unity3d 雪与沙的渲染
- unity3d 随机生成地形之随机山脉
- unity3d 随机生成地形之随机山脉
- 3D unity
- Unity Manual之Vector3 三维向量
- Unity Manual之ScriptableObject 脚本化对象
- Unity Manual之PlayerPrefs 游戏存档
- Unity Manual之Transform 变换