This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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