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

# init(circleOfRadius:)

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

## Declaration

```swift
init(circleOfRadius r: CGFloat)
```

## Parameters

- `r`: The radius of the circle.

## Mentioned in

Shaping a Physics Body to Match a Node’s Graphics

## Return Value

Return Value A new volume-based physics body.

## Discussion

Discussion The following code shows the code that creates the physics body for a spherical or circular object. Because the physics body is attached to a sprite object, it usually needs volume. In this case, the sprite image is assumed to closely approximate a circle centered on the anchor point, so the radius of the circle is calculated and used to create the physics body. Listing 1. A physics body for a circular sprite If the physics body were significantly smaller than the sprite’s image, the data used to create the physics body might need to be provided by some other source, such as a property list.

## See Also

### Creating a Body from a Shape

- [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)
- [init(polygonFrom:)](spritekit/skphysicsbody/init(polygonfrom:).md)
