---
title: "init(edgeLoopFrom:)"
framework: spritekit
role: symbol
role_heading: Initializer
path: "spritekit/skphysicsbody/init(edgeloopfrom:)-5grxu"
---

# init(edgeLoopFrom:)

Creates an edge loop from a path.

## Declaration

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

## Parameters

- `path`: A Core Graphics path. The points are specified relative to the owning node’s origin. The path must not intersect itself.

## Mentioned in

Shaping a Physics Body to Match a Node’s Graphics

## Return Value

Return Value A new edge-based physics body.

## Discussion

Discussion If the path is not already closed, a loop is automatically created by joining the last point to the first. 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.

## See Also

### Creating an Edge-Based Physics Body

- [Creating an Edge Loop Around a Scene](spritekit/creating-an-edge-loop-around-a-scene.md)
- [init(edgeLoopFrom:)](spritekit/skphysicsbody/init(edgeloopfrom:)-8sqfy.md)
- [init(edgeFrom:to:)](spritekit/skphysicsbody/init(edgefrom:to:).md)
- [init(edgeChainFrom:)](spritekit/skphysicsbody/init(edgechainfrom:).md)
