Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

185
Vistas
Three.js Set relative position to another Object

Recently, I've been working on a video game with Three.js and I want the up arrow key to go forward relative to the camera.

Here is my code for the arrow key.

var x = 0;
var rotx = 0;
setInterval(function() {
    if (x == 1){
        camera.position.z += 0.05
    }
}

    document.addEventListener("keydown", function(event){
        if (event.key == "ArrowUp"){
            x = 1
        }
    });
    document.addEventListener("keyup", function(event){
        if (event.key == "ArrowUp"){
            x = 0
        }
});

Many times I've been searching for the answer. Usually coming across both

object.localToWorld();
object.worldToLocal();

but I can't seem to understand how to use this method.

about 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda