Create a cylinder shape by specifying the number of subdivisions >= 3.
cylinder 12 myCylinder -- A cylinder with 12 faces (not counting the top and bottom face)
cylinder 2 myCylinder -- Too few faces so it has 3 faces insteadNote that it’s more efficient to simulate cylinders with an even number of faces than an odd number of faces. This is because the collision performance depends on the number of unique faces that are not parallel with each other (and edges too).
Create a shape from a triangular mesh. This is useful if you want to import from Blender using elm-obj-file.
Note: this may cause unexpected behavior, unless you make sure that:
Shapes are only needed for creating compound bodies.
If you need a body with a single shape, use the corresponding functions from the Physics.Body module.
The supported primitive shapes are:
For the more complex cases use the unsafeConvex shape.
Shapes are defined in the body coordinate system.