Per Pixel Collision Detection
- by CJ Cohorst
Just a quick question, I have this collision detection code:
public bool PerPixelCollision(Player player, Game1 dog)
{
Matrix atob = player.Transform * Matrix.Invert(dog.Transform);
Vector2 stepX = Vector2.TransformNormal(Vector2.UnitX, atob);
Vector2 stepY = Vector2.TransformNormal(Vector2.UnitY, atob);
Vector2 iBPos =…