Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fluid Counter
#4
(05-09-2022, 01:49 PM)0hsyn1 Wrote: I was doing silly experiments Sonrisa I added the wrong code I added the wrong code.  Sorry Triste 
counter runs but returns a number greater than 400 particles

Yes, as I explained this will add one to the counter every frame a particle is in contact with the collider. So unless particles are only in contact for one frame (which is highly unlikely), it will return a number far greater than 400.

What you want is to determine if a particle has already been counted and if so, ignore it. There's many ways to do this, easiest is to use a hash set. See:
http://obi.virtualmethodstudio.com/forum...=collision
Reply


Messages In This Thread
Fluid Counter - by 0hsyn1 - 05-09-2022, 01:04 PM
RE: Fluid Counter - by josemendez - 05-09-2022, 01:40 PM
RE: Fluid Counter - by 0hsyn1 - 05-09-2022, 01:49 PM
RE: Fluid Counter - by josemendez - 05-09-2022, 01:51 PM
RE: Fluid Counter - by 0hsyn1 - 05-09-2022, 01:58 PM
RE: Fluid Counter - by josemendez - 05-09-2022, 02:06 PM
RE: Fluid Counter - by 0hsyn1 - 05-09-2022, 02:10 PM