Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inertia of Cone Geometry seems wrong #55

Open
maheshkurmi opened this issue Jan 2, 2023 · 2 comments
Open

Inertia of Cone Geometry seems wrong #55

maheshkurmi opened this issue Jan 2, 2023 · 2 comments

Comments

@maheshkurmi
Copy link

Oimophysics uses Inertia about center of shape at (0,H/2,0) assuming origin at center of base of shape.

While calculating Inertia of body, parallel axis theorem is used but I think cone geometry should be treated differently as its center of mass lies at (0,H/4,0) rather than (0,H/2,0).

Correct me If I misunderstood your method of calculating inertia tensor.

@saharan
Copy link
Owner

saharan commented May 16, 2024

I think you are right, but currently OimoPhysics doesn't have a flexible center of mass system and each shape's center of mass is fixed to its local origin. Adjusting cone's center of mass to physically accurate position at this point makes it less intuitive to add cones to a rigid body at an intended position (since the origin shifts from the geometrical center).

So I leave this as intended, but want to fix when a more flexible center-of-mass system is implemented (like Box2D's one).

@maheshkurmi
Copy link
Author

I have ported OimoPhysics engine to java (https://github.com/maheshkurmi/OimoPhysics_Java).
I am considering it over Bullet jni wrapper since I can easily modify it as per my need.

Planned updates

  1. Re-organisation of callbacks and structure to match with box2D
  2. Masstype (as in box2d) to allow customizing center of mass location
  3. Heightfields
  4. Particle System

Can I use the modified engine in commercial application?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants