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

166
Vistas
How to rotate a plane 90 degrees, with texture

I'm attempting to build an fps game, but when I go to rotate the floor anywhere close to 90 degrees it just vanishes from the scene. Here's the code responsible for the plane.

var colorMap = new THREE.TextureLoader().load('/textures/wood_albedo.png');

var radian = 2 * Math.PI *(90 / 360);
var geometry = new THREE.BoxGeometry(20, 20);

var material = new THREE.MeshStandardMaterial({color: 'white', side: THREE.DoubleSide});

var mesh = new THREE.Mesh(geometry, material);

scene.add(mesh);

I'm not sure what I'm doing wrong. Any help would be appreciated, thanks for reading.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Your code seems fine, as I assume you are mapping the image to the plane behind the scenes. The only thing I would check is that 2 * Math.PI * (90 / 360) is the same thing as Math.PI / 2. Another thing you should check is that instead of white, it would be ideal to use a shade of grey for the map.

Your problem could have a simple solution - your rotation is making the plane parallel to the camera, making it invisible. You should typically keep your rotations in terms of Math.PI. Let me know if you have any further questions on this.

Tip: Adding a jsfiddle link could help greatly debug your problem.

about 4 years ago · Juan Pablo Isaza Denunciar
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