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

230
Views
ammo.js after calling applyTorque how to update the force direction?

I am using ammo.js to create a simple demo.

I have a 3d object in the world and I can make it move with the following code:

cubeObject.applyForce(new Vec3(10, 0, 0));

It will move along the x-axis and then stop gradually.

Now I want to make it to turn a little bit (imagine a car turning):

cubeObject.applyTorque(new Vec3(0, 1000, 0));

After calling this code, the cube (car) dose turn a certain degree (this is good as expected).

But the problem is, the car is still moving along the x-axis instead of moving towards the direction it is facing (after turning).

I do not know what I am missing here.

Any advice will be appreciated, thank :)

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!