public WalkerWall(Visualizer2D.Wall wall) { Point2D origo = wall.End + 0.5f * (wall.Begin - wall.End); Vector2D xAxis = (wall.End - wall.Begin).Normal.UnitVector; float height = (wall.End - wall.Begin).Magnitude; Collider = new Visualizer2D.RectangleCollider(new CoordinateSystem2D(origo, xAxis), wall.Width * 2, height); }
public bool Collide(RectangleCollider other) { return(other.Collide(this)); }