Corner sliding

04 Sep 2014

Here’s something that should make the game easier to pick up: corner sliding. If the player is walking into a corner of a wall, they will slide around the corner instead of being stopped completely. This makes walking through those tight corridors much eaiser.

The feature was implemented using a hybrid diamond/AABB collision shape for players. The diamond shape is used when moving in cardinal directions (up/down/left/right). This creates the corner sliding, as the diamond “slides” around the corners. AABB (axis-aligned bounding box) is used when moving diagonally, so that wall sliding works, which has been in C-Dogs all along.

comments powered by Disqus