Chipmunk2D Unity Documentation | Main Page | Forum

ChipmunkShapes:

Chipmunk2D for Unity has four primitive shapes, circles, rounded segments, boxes, and polygons. Shapes give a physical form to a ChipmunkBody, and define the actual area to interact with.

If a ChipmunkShape is not attached to a ChipmunkBody (on the same gameobject or a child of a ChipmunkBody). It is called a static shape. Static shapes don't move, but use less CPU and are ideal for things like terrain.

As with PhysX, you can attach multiple shapes to one body. Place additional shapes in children gameobjects. If you ever want two shapes inseparably bound together, this is the way to do it! (no joints needed!)

ChipmunkCircleShape Inspector

Inspector Values

The shapes

Circle

ChipmunkCircles are simulated as perfectly round shapes. They have a radius and center offset.

Pretty simple!

Segment

ChipmunkSegmentShapes are a line between two points, of a certain radius. Endpoints are independently adjustable in the editor. While creating segments with a radius of zero is fine, using a radius is recommended. Rounded edges help to prevent catching, especially when segments are used as terrain.

Box

ChipmunkBoxShapes are a convenient way of creating a box. The editor supports easy size adjustments. You may supply a radius to bevel the edges of the box, if desired. Boxes are implemented as subclasses of ChipmunkPolygonShapes.

Polygon Shape

ChipmunkPolygonShape are arbitrary convex shapes defined by a series of vertices. You may bevel their corners by adjusting the radius.