Implementing bouncing with HC
Posted: Mon Nov 12, 2018 9:35 am
I am trying to implement really basic physics using HC for collision detection, and I seem to have not implemented bouncing correctly. I have a moving ball and a static square, and I am trying to use the separating vector returned by HC.collisions() to change the direction of the ball's velocity so that it bounces off the square when it collides. What is instead happening is that the ball hits the square and travels slower almost completely straight downwards (positive Y axis).
My minimal reproduction of this issue is here: https://gitlab.com/aidalgol/hc-love-collision-bug
My minimal reproduction of this issue is here: https://gitlab.com/aidalgol/hc-love-collision-bug