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

158
Views
Get worldposition of an object in React Three Fiber without onClick

currently I am creating a robot model in react. This robot model is in .glb format and I am using React Three fiber to paste every mesh object in to the scene (I got the names of the meshes from blender). Via zustand and my control function I can rotate some joints to move the robot in the direction of desire. My next goal is to "extract" each worldcoordinate of the joints and show them in my overlay close to the control buttons. I already tried something like that:

<mesh
                    ref={joint_1}
                     onClick={(vectorEvent) => {
                       let vector = new THREE.Vector3();
                       vectorEvent.object.getWorldPosition(vector);
                       console.log(vector);
                     }}
></mesh>

but this only works when I click the joint I want the coordinate from. I want to do this with an onClick event on my control function(complete different function and not part of THREE nor GLTF) when I change some angles. Any Ideas?

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