Jump to content

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. https://www.babylonjs-playground.com/#2B84TV#8

Link to comment
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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...