Skip to content

Instantly share code, notes, and snippets.

Created December 15, 2022 14:24
What would you like to do?
scene.registerAfterRender(function() {
// if(sphere.intersectsMesh(hitbox))
F = engine.getFps();
if((map["a"] || map["A"])){
sphere.translate(BABYLON.Axis.X, -distance, BABYLON.Space.WORLD);
if((map["d"] || map["D"])){
sphere.translate(BABYLON.Axis.X, distance, BABYLON.Space.WORLD);
if((map["w"] || map["W"])){
sphere.translate(BABYLON.Axis.Z, distance, BABYLON.Space.WORLD);
if((map["s"] || map["S"])){
sphere.translate(BABYLON.Axis.Z, -distance, BABYLON.Space.WORLD);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment