13-10-2018, 03:33 AM
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.
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.