init(edgeLoopFrom:)
Creates an edge loop from a rectangle.
Declaration
init(edgeLoopFrom rect: CGRect)Parameters
- rect:
The rectangle that defines the edges. The rectangle is specified relative to the owning node’s origin.
Mentioned in
Return Value
A new edge-based physics body.
Discussion
An edge has no volume or mass and is always treated as if the isDynamic property is equal to false. Edges may only collide with volume-based physics bodies.