Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

155
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!