Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Counting Particles
#1
Hi There,

I'm working on a 2D game (Unity) about transferring fluid from one cup to another cup.

To measure success, I need to count the number of particles that were transferred from the 1st cup to the 2nd cup. Currently, I am subscribing to the Solver.OnCollision event. I have a "Trigger=true" BoxCollider2D inside the 2nd cup that I compare with the event callback Collider. My code is very similar to the code shown in this thread:

http://obi.virtualmethodstudio.com/forum...=collision


My problem is that the "count" is never actually correct. It seems to be always less than the actual count. I'm wondering if there's possibly collisions not being detected? I have my Fixed TimeStep set to 0.005.

The transfer can be violent and quick sometimes, but the fluid never clips out of the cup. I'm only using 55 particles.
Reply


Messages In This Thread
Counting Particles - by docgonzzo - 13-10-2018, 03:33 AM
RE: Counting Particles - by josemendez - 13-10-2018, 08:58 AM
RE: Counting Particles - by docgonzzo - 16-10-2018, 12:25 AM
RE: Counting Particles - by josemendez - 17-10-2018, 08:29 AM