Different gravity for different meshes

Recommended Posts

2 hours ago, PavolHejný said:

Can I somehow (with physics plugin Oimo.js) set different gravity for different meshes?
For example I want to simulate environment in water and I want to have there buoyancy.

Thanks a lot for your advice.

I'm not guru on physics :).

It might help you.

Share this post

Link to post
Share on other sites

for small objects (not counting ie: water/air resistance):
force = mass X gravity.

I made a small PG:
If the sphere mass and diameters are the same they bounce the same.  A bigger sphere with same mass does not bounce the same, so something else is being taken into account!

I thought then that if I made their density the same they would act more similar (in PG), so the physics engine must already do something, as they don't bounce the same from same start point.  There was a thread recently on physics friction with interesting comments.  Some engines have extra functionality - I tried the PG in Cannon.  I'm not aware of their being a way to explicitly set density for buoyancy. Maybe you can apply impulses with a vertical vector to influence the buoyancy.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.