Rectangle Shape for 2D Physics. Rectangle Shape for 2D Physics. This shape is useful for modeling box-like 2D objects. Return the half extents, the actual width and height of this shape is twice the half extents. Set the half extents, the actual width and height of this shape is twice the half extents.