p5.collide2D
p5.collide2D copied to clipboard
Option to calculate intersection points for circles
may have missed this, but would be nice to be able to get circle/circle and circle/line intersection points as well (either 1 or 2)
agreed.
This will take some amount of non-related sub-collision to achieve. eg. collision detection that is not inherent to the calculation of the collision being calculated. Circle collisions are not based on where the intersection happened, instead based on distance from the center point.
But I agree it would be nice to have, but was never implemented because it is an additional step.
@bmoren I would be willing to take this up.
Hi @brownsloth sounds good, make a PR when it's ready and I'll review.
THANK YOU!
@bmoren I am done with the changes. This might sound trivial but I need to test them, what's the procedure for that?
There is no formal procedure, but if you can provide some context / sketches for your testing procedure that should be good enough for me.
I'd just try and make a variety of sketches that think about the normal and edge cases