[Edited title as it was solved]
Hi all
I’m trying to model the collisions of two blocks in unity, following this video by 3blue1brown: The most unexpected answer to a counting puzzle - YouTube - the interesting finding (which I’m trying to model) is that the number of collisions between two objects ‘traces out’ the value of pi.
When I have the two cubes of mass 1 each, OnCollisionEnter correctly reports 3 collisions. When I change the mass of the cube on the right to 100 I get 31 collisions - which is again, correct. However when I change the mass of the cube on the right to 10,000 - I should get 314 collisions, but instead only 20 collisions are reported.
I’ve tried changing the value of the ‘Default Contact Offset’ in project settings / physics to a tiny value (e.g. 10^-15) and that increases the number of collisions to 167 - but further decreasing it doesn’t increase the collisions beyond the 167 (curiously roughly half the correct answer, but I think that’s a red herring as exactly half would be 157). I’ve also set collision detection on the rigibodies to be continuous, and have changed various other physics settings to no effect.
Is there another setting I should be changing to increase the accuracy or is this just a limit of Unity’s modelling?
I’ve attached the files in case of use.
Many thanks for any help
John
[180254-3blue1browntestunitypackage.zip|180254]