Replies: 1 comment 2 replies
-
Yes, I think that would work.
You would do something like this to ensure that the inertia is properly set on the plane:
Shapes are immutable (except for MutableCompoundShape), so there aren't many other options. Setting a new shape will incur some cost, but compared to the rest of the sim it should be minor. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am running a flight model simulation for an aircraft and this requires the centre of mass and inertia tensor to be updated every frame as fuel is burned and transferred around.
If I have understood the docs correctly the offset allows you to offset the centre of mass meaning the original calculated centre of mass is used. Would the below code snippet work to set the centre of mass at a desired point in the shape frame of reference?
Secondly when the centre of mass is shifting during runtime I must update it and the inertia tensor:
Related discussion: #397
Any help is appreciated!
Beta Was this translation helpful? Give feedback.
All reactions