Contents

init(rectangleOf:center:)

Creates a rectangular physics body centered on an arbitrary point.

Declaration

init(rectangleOf s: CGSize, center: CGPoint)

Parameters

  • s:

    The size of the rectangle.

  • center:

    The center of the square in the owning node’s coordinate system.

Return Value

A new volume-based physics body.

See Also

Creating a Body from a Shape