Skip to content

Instantly share code, notes, and snippets.

@flushpot1125
Last active August 5, 2018 03:44
Embed
What would you like to do?
//translateを実現
var direction = new BABYLON.Vector3(0, 3, 0);//目的地
direction.normalize();
distance = 0.01;
var i = 0;
scene.registerAfterRender(function () {
if(pushedFlag == true){
if(i++<300){
mesh.translate(direction, distance, BABYLON.Space.WORLD);
} else{
translateFlag = false;
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment