2017-11-25 3 views
0

こんにちは私はBABYONJSでシーンを作成しましたソロシステムここでBABYONjsで私は地球を自己回転させましたが、私はarroundを動かそうとしましたが、どのアイデアも動作しませんでしたか?BABYLONJSでメッシュを動かすには?

マイコード

自己回し

scene.beforeRender = function() {  
     newEarth.rotate(new BABYLON.Vector3(0, 1, 0) , 0.01, 
     BABYLON.Space.WORLD); 
}; 

必要が地球では、私は解決策たちを持っている。ここの下arroundの

enter image description here

答えて

0

移動する必要がありますピボット行列

currentMesh.setPivotMatrix(BABYLON.Matrix.Translation(70, 0, 0)); 
    camera.attachControl(canvas, true); 
    scene.registerBeforeRender(function() { 
     if (currentMesh) { 
      currentMesh.rotate(BABYLON.Axis.Y, Math.PI/64, 
       BABYLON.Space.LOCAL); 
     } 
    }); 

これを試してみてください。

関連する問題