Tag Info

New answers tagged


You should definitely do this in the CollisionManager class. However, your question seems to allude to something inhibiting you from doing this, although I'm not sure what. If you're worried about good code design, then it's fine to use Get and Set methods to retrieve and set the positions you need when detecting and resolving collisions. This doesn't ...


I didn't understand what you mean with 'stuck' but have a look at this post. I shared my simple 2d collision system. Maybe it helps. :)


I don't exactly know what you meant by 'stuck'. If it's stuck as in 'can't move in any direction' then the problem probably in the offset distance. Are FootRectangle.Height, FootRectangle.Width, Location.x, Location.y etc. of type float or int ? If it's an int then dividing it them by 2 (which another int) will only yield an int. Meaning, something like ...


Ask yourself these questions: Does your player get stuck on contact? Does your player on contact 'jitters' more into the wall and then gets stuck, or does your player get stuck when moving or jumping fast into the wall. If it gets smoothly stuck on contact, you need to improve your guard. Are you absolutely sure that the distance between center of your ...

Top 50 recent answers are included