flight simulation: I want to applyForce/LinearVelocity perpendicular to body. How do i resolve x,y components?

Here's the place to get help and discuss features. The focus is on the C++ version, but generic questions are welcome.
whiteeagle1942
Posts: 1
Joined: Thu Mar 02, 2017 2:45 am

flight simulation: I want to applyForce/LinearVelocity perpendicular to body. How do i resolve x,y components?

Postby whiteeagle1942 » Thu Mar 02, 2017 8:04 am

I want to simulate a drone like object. It would have two thrusters which would only applyForce or Linear velocity perpendicular to body. As for now we have to specify force in x and y and these components remain constant irrespective to body angle. I want to apply force perpendicular to body, so that when angle changes (or drone tilts in either direction) it should have velocity in x axis as well. I've been trying to do this over for a week now please help!! Because I am bad at maths i dont think i'd be able to solve this in my lifetime.
Screenshot from 2017-03-02 20-32-30.png
Screenshot from 2017-03-02 20-32-30.png (17.24 KiB) Viewed 402 times

Image B shows how i want force angles to stay perpendicular.
Please can anyone explain a bit logic on how to resolve x,y components taking body.getAngle() ?



Return to “General Discussion”



Who is online

Users browsing this forum: No registered users and 6 guests