Trying to implement smooth collisions without other issues

This commit is contained in:
Kayne Ruse
2014-12-27 16:43:40 +11:00
parent ee0b7884a8
commit 5c1ea1988e
3 changed files with 54 additions and 3 deletions
+10 -2
View File
@@ -23,14 +23,22 @@
#define LOCALCHARACTER_HPP_
#include "base_character.hpp"
#include "bounding_box.hpp"
#include "vector2.hpp"
#include <list>
class LocalCharacter: public BaseCharacter {
public:
LocalCharacter() = default;
virtual ~LocalCharacter() = default;
private:
//NOTE: NO MEMBERS
void ProcessCollisions(std::list<BoundingBox>& boxList);
protected:
bool CheckCollisionSimple(std::list<BoundingBox>& boxList, Vector2 newPos);
double CorrectVelocityX(std::list<BoundingBox>& boxList, double velocityX);
double CorrectVelocityY(std::list<BoundingBox>& boxList, double velocityY);
};
#endif