Type Method

bodyWithPolygonFromPath:

Creates a polygonal physics body.

Declaration

+ (SKPhysicsBody *)bodyWithPolygonFromPath:(CGPathRef)path;

Parameters

path

A convex polygonal path with counterclockwise winding and no self intersections. The points are specified relative to the owning node’s origin.

Return Value

A new volume-based physics body.

See Also

Creating a Body from a Shape

+ bodyWithCircleOfRadius:

Creates a circular physics body centered on the owning node’s origin.

+ bodyWithCircleOfRadius:center:

Creates a circular physics body centered on an arbitrary point.

+ bodyWithRectangleOfSize:

Creates a rectangular physics body centered on the owning node’s origin.

+ bodyWithRectangleOfSize:center:

Creates a rectangular physics body centered on an arbitrary point.