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

234
Views
three.js get right hand vector

This gives me the forward vector of a Object3d

var forward = new THREE.Vector3();
object.getWorldDirection(forward); 

How do I get the right-hand side vector of the object (using Three.JS)?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

My best advice is to NOT include 'three.js' in your Google search when looking help regarding three.js.

I excluded 'three.js' from my searches and found similar questions by people in a Unity community...

Knowing this I found a very simple (admittedly very hacky) solution which works in three.js.

Take a plain-old right-hand vector

var right = new THREE.Vector3( 1, 0,  0 );

And just "turn it" by the object's .quaternion value...

right.applyQuaternion( object.quaternion );

Any (normalized) direction relative to the object's rotation can be gleamed in this fashion

Example: http://jsfiddle.net/9Lzx683v/

Picture of a Cube, with six smaller cubes orbiting around it's XYZ axis directions

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!