I am new to programming so thought I would make a Pac-Man clone to teach myself. I am doing it in C++ using SFML. Anyway, I use a bunch of collision tests. Everything works great.. but if I am going to fast then the collisions simply fail and nothing happens.
Pac-Man is moving though a factor = velocity * frametime;
I am using SFML rectangles to do the tests... eg...
This tests a point in space to see if it is inside the rectangle. The point being the centre of pac-man.
So yeah.. I would love to hear any ideas on this!
Thanks in advance --Jynks
if ( _rectSwitch.getGlobalBounds().contains( PacMan.getPosition().x, PacMan.getPosition().y )