2017-04-22 12 views
0

デフォルトでは、modelInstanceは中心(0,0,0)で回転しています。回転させたいのは(0,2,2)です。他のゲームエンジンでは、model.setRotationPivot(float)のようなメソッドがありますが、libgdxに似たようなメソッドがありますか?libgdx - モデル回転ピボットを設定するには?

// how to set rotation pivot? 
modelInstance.transform.set(position, rotation, scale); 

ありがとうございます!

+0

テクスチャを回転したいですか?それはあなたが求めていることですか? –

+0

@JasonSingh、3Dモデルを回転したい – akabc

答えて

0

後期回答:

ピボットを設定する方法はありません。 私はこのための回避策を使用します。

Vector3 vec3 = new Vector3(0, 2, 2); 
vec3.rotate(Vector3.Y, rotation); 
modelInstance.transform.setToTranslation(vec3); 
this.transform.rotate(Vector3.Y, rotation); 
関連する問題