Type Method

bodyWithRectangleOfSize:

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

Declaration

+ (SKPhysicsBody *)bodyWithRectangleOfSize:(CGSize)s;

Parameters

s

The size of the rectangle.

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:center:

Creates a rectangular physics body centered on an arbitrary point.

bodyWithPolygonFromPath:

Creates a polygonal physics body.