Premium Features

Download Video

Collision detection

Published 3 months ago

With collision blocks in place, now we can code some good ol' collision detection. The easiest way I've found to respond to collision detection consists of checking for collisions on the x-axis, applying gravity, then checking for collisions on the y-axis. With this method, we're only ever checking for collision with one block at a time, which in return will allow us to push our player to the correct position that gives off the effect of a "collision."

This video will explain this technique in-depth.

Comments

Want to participate?

Create a free Chris Courses account to begin

Login

No comments yet, be the first to add one

Providing the lift to launch your development career

© 2022 Chris Courses. All rights reserved.