---
title: "init(polygonFrom:)"
framework: spritekit
role: symbol
role_heading: Initializer
path: "spritekit/skphysicsbody/init(polygonfrom:)"
---

# init(polygonFrom:)

Creates a polygonal physics body.

## Declaration

```swift
init(polygonFrom path: CGPath)
```

## Parameters

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

## Mentioned in

Shaping a Physics Body to Match a Node’s Graphics

## Return Value

Return Value A new volume-based physics body.

## See Also

### Creating a Body from a Shape

- [init(circleOfRadius:)](spritekit/skphysicsbody/init(circleofradius:).md)
- [init(circleOfRadius:center:)](spritekit/skphysicsbody/init(circleofradius:center:).md)
- [init(rectangleOf:)](spritekit/skphysicsbody/init(rectangleof:).md)
- [init(rectangleOf:center:)](spritekit/skphysicsbody/init(rectangleof:center:).md)
