A
A
Atlllantis2019-02-23 17:46:36
Game development
Atlllantis, 2019-02-23 17:46:36

How to make correct object transition between multiple buoyancy effector 2d?

In general, there is a buoyancy effector 2d and a polygon collider 2d on it .
An object that falls into the water should sink.
It turns out something like this: 5c715aa666428510901721.jpeg
The problem is that parts 1 and 2 are separated by the inner vertex of the polygon (or what is it called? - it doesn’t matter).
Accordingly, the object, having fallen into the water, falls to the line separating parts 1 and 2 and freezes there. If you make the object heavier, then it passes through the line, but at that moment it slows down a lot.
The same if you make 2 separate buoyancy effector 2d with box collider 2d .
Do buoyancy"dencity" is set to 2, if set to 0, then everything is fine, but this option does not suit me, because some objects should not sink.
It is necessary that sinking objects do not collide with the inner boundary, but sink further.
How can this be fixed/done?
In which direction to dig?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Gaydak, 2019-02-23
@MrMureno

wait, what's wrong??
the heavy ones sink, and the light ones float on the boundary of the liquid.
when you set the density (density) of a liquid to zero, then all objects sink in it))
what do you want??
you essentially simulate a container with a liquid (fluids), with the specified density and water level in it
, probably at the border, the body is still pushed out of the first liquid and therefore not heavy enough to "sink" into another))
And now, in the case,
You can try to do just a rectangular shape for the liquid, and further limit the shape with colliders to give such a funnel shape as in the image you have.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question