I'm making a 2D game I implemented a physics engine in the game, when the player jumps, its arc The way is due to its velocity and gravity in the game. When the player is falling apart, it becomes bigger and bigger because it accelerates.
How do I know that the player collides with something in its path, if the new location puts the player on the other side of the object?
I can test every point with the path of players using a loop. Is this the only way to do it? Is there a more elegant algorithm or pagam solution?
A solution involves an invisible tail large To compensate for the vector vector is long enough.
Comments
Post a Comment