Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Calculating the Amount of Fluid
#2
(04-03-2021, 03:53 PM)Oziko Wrote: I'm doing a game where I carry water in a container. The amount of water remaining in the container is different in each section.

I want to give a percentage of how much water is left in this container. How am I going to do this?

You can use a trigger collider that spans the entire volume of the container. Then use collision callbacks:
http://obi.virtualmethodstudio.com/tutor...sions.html

To count how many particles there are inside the container. Check the included FluidMaze sample scene, it uses this method to calculate the percentage of fluid that has reached the maze goal.
Reply


Messages In This Thread
Calculating the Amount of Fluid - by Oziko - 04-03-2021, 03:53 PM
RE: Calculating the Amount of Fluid - by josemendez - 04-03-2021, 03:57 PM
RE: Calculating the Amount of Fluid - by Samadhi - 04-03-2021, 10:26 PM