[SOLVED] Physics mimic lighter than air gas particle

I want to mimic a lighter than air gas particle.

This is my closest try in settings:

The project is public here:

  • and I strive to make the top box fall down upon the lower box in the container. From there it will have to become a gas particle, that bounces of every side of the contatiner (thus lighter than air)

Do you want it to float or rise when it’s in the box? If it’s just to float, I would apply an upward force every frame that is equal to gravity.

good thing you answered (in particular*) … were snooping around a little afterwards, and I am now quite certain I have to code ‘the two remaining XYZ-bounces’ (we do have gravity already).
*) Especially after reading this where you help as well: Get angle of collision between wall and player (rigidbodies)

Kind of okr but I had hoped for a little more in the codebase functionality, concerning bounce-off directions :slight_smile:

Do you a video or a gif of the effect you are looking for? I’m not sure what more functionality is needed here by the engine.

Are you trying to apply extra energy when the particle enters the box? Do you just want it to float until other particles enter and collide with it?

It sounds like you just want the particle to bounce around when it enters the box so I would negate the affect of gravity (as mentioned in my last post) and apply an impulse to it. It should just bounce around until it leaves the box and maybe lose energy from the collisions.

Like in this video: https://www.youtube.com/watch?v=gmN2fRlQFp4 (minute 5 to 6 approx)
Yes, if bounce off other particles, great … but again can be coded as new-vector-movement I guess

I have already tried to apply negative gravity, but not possible

Here’s an old project of mine where I’m using physics to upright a rigid body that may help https://playcanvas.com/project/597046/overview/this-way-up

I apply ‘anti-gravity’ to make the box float.

Correction … well at least I got a plus-value to work at gravity, but somehow that interpolated my object to stop in mid-air no matter what I did? … but will try and look at your project :slight_smile:

Ok, definitely useful … can only deserve a SOLVED :slight_smile: