Box collision detection and bouncing

后端 未结 4 1662
一生所求
一生所求 2021-01-27 14:07

I\'m making pong, and am finding it really difficult to write an algorithm that bounces the ball off the four walls properly (I will deal with scoring later on, because only par

4条回答
  •  说谎
    说谎 (楼主)
    2021-01-27 14:16

    In this KineticModel, the method collideWalls() uses two-dimensional vector arithmetic to simplify the simulation of an elastic collision between a particle and a flat surface.

提交回复
热议问题