RayLib 2D Challenge Part 8 – Walking on Terrain (Simulating Physics)

Part 7 of this challenge got a 2D camera working that smoothly tracks the player. Everything looks great until Scarfy walks too far in either direction. At that point it’s obvious that the ground was totally faked. Here’s the offending code:auto boundingRect = actor->getBoundingBox(); auto distToGround = groundYPos – (boundingRect.y + boundingRect.height); bool isOnGround = […]

Shopping Cart
Scroll to Top