//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