libgdx - 如何设置模型旋转轴?
问题描述:
默认情况下,modelInstance按其中心(0,0,0)旋转,我希望它通过(0,2,2)旋转。我知道在其他游戏引擎中有类似model.setRotationPivot(float)
的方法,libgdx中是否有类似的方法?libgdx - 如何设置模型旋转轴?
// how to set rotation pivot?
modelInstance.transform.set(position, rotation, scale);
谢谢!
答
最后回答:
据我所知没有方法来设置数据透视。 我对此使用了一种解决方法。
Vector3 vec3 = new Vector3(0, 2, 2);
vec3.rotate(Vector3.Y, rotation);
modelInstance.transform.setToTranslation(vec3);
this.transform.rotate(Vector3.Y, rotation);
你想旋转你的纹理?你在问什么? –
@JasonSingh,我想旋转3d模型 – akabc