【发布时间】:2017-09-30 10:34:38
【问题描述】:
在libgdx 中,当使用Model 到ModelInstance 执行以下代码时,它具有多个节点(其中一个是“臀部”):
Matrix4 mtr4 = new Matrix4().idt();
mtr4 = modelInstance.getNode("Hips").globalTransform.cpy();
mtr4 = mtr4.translate(deltaVector3);
modelInstance.getNode("Hips").globalTransform.set(mtr4);
//now, mtr4 still has the same value when:
mtr4 = modInstance.getNode("Hips").globalTransform.cpy();
modelInstance.calculateTransforms();
//after following, mtr4 will be reset to before it was translated with deltaVector3
mtr4 = modInstance.getNode("Hips").globalTransform.cpy();
为什么mtr4 的值会变回? calculateTransforms() 方法不是“应用”分配给节点的内容吗?
【问题讨论】:
标签: java libgdx transformation