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

363
Views
How to rotate an object around a distant pivot based on pivot rotation?

I've read the answer to the Three JS Pivot point question and it works okay. But what I'm trying to accomplish involves also the object to rotate based on the pivot rotation.

Let's say for instance that I have an object red that acts as a pivot for the little object blue. As soon as the red object moves or rotates, the blue object will move and rotate accordingly but keeping the distance between red and blue.

For simplicity in the following image we're only in the situation in which the red object rotates only.

The signature of the function answered in the other question is the following:

function rotateAboutPoint(obj, point, axis, theta, pointIsWorld)

I don't understand how do I get the axis and theta values starting from the red object rotation.

Or if that function doesn't fit this case, I'm open for other solutions.

I know that if I add the blue object as a child of the red one everything will fall in place, but I need the two objects (red and blue) to be independent from each other.

To complicate things more I'm not rotating the red object directly, but I'm using ammo.js to apply force and torque on it as a dynamic body, but I guess that I can still know its rotation by using red.rotation

red pivot rotation

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!