korge
korge copied to clipboard
Make onCollision events and its cousins return more info about the collision event.
Currently, onCollision and onCollisionExit only return the view object in the callback.
I wish that it would also return the collision information, such as where the collision point was (on the right of the view? on the left?).
Without this info, it's difficult to take meaningful action on the event. Take for example, we implement a ball bouncing around a box like Pong. On the balls collision with the walls, without collision info, it's cumbersome to resolve which side the ball was hit on, and therefore, which way the ball should reflect (e.g. along x axis? along y axis?)
Thanks!