Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fluid Counter
#5
(05-09-2022, 01:51 PM)josemendez Wrote: 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

Yes, I found the post you shared while doing research.
"idToCollider" "particle"  syntaxes appear as console errors.
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