<!--
{
  "availability" : [
    "iOS: 8.0.0 - 26.0.0",
    "iPadOS: 8.0.0 - 26.0.0",
    "macCatalyst: 13.1.0 - 26.0.0",
    "macOS: 10.8.0 - 26.0.0",
    "tvOS: 9.0.0 - 26.0.0",
    "visionOS: 1.0.0 - 26.0.0",
    "watchOS: 3.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SceneKit",
  "identifier" : "/documentation/SceneKit/SCNCapsule",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNCapsule"
  },
  "title" : "SCNCapsule"
}
-->

# SCNCapsule

A right circular cylinder geometry whose ends are capped with hemispheres.

```
class SCNCapsule
```

## Overview

![](images/com.apple.scenekit/media-2929808@2x.png)

Define the size of the two hemispheres forming the ends of a capsule with the [`capRadius`](/documentation/SceneKit/SCNCapsule/capRadius) property. Because the cylindrical body of the capsule stretches between the its two hemispherical ends, its circular cross section in the x- and z-axis dimensions has the same radius. Define the capsule’s extent in the z-axis dimension of its local coordinate space with the [`height`](/documentation/SceneKit/SCNCapsule/height) property. To change the orientation of a capsule, adjust the [`transform`](/documentation/SceneKit/SCNNode/transform) property of the node containing the capsule geometry.

Control the level of detail with the [`heightSegmentCount`](/documentation/SceneKit/SCNCapsule/heightSegmentCount), [`capSegmentCount`](/documentation/SceneKit/SCNCapsule/capSegmentCount), and [`height`](/documentation/SceneKit/SCNCapsule/height) properties. Higher radial and cap segment counts create smoother curves for the cylinder’s circular sides and hemispherical ends. A higher segment count in any direction produces more vertices, which can improve rendering quality for certain lighting models or custom shader effects, but at a cost to rendering performance.

## Topics

### Creating a Capsule

[`init(capRadius:height:)`](/documentation/SceneKit/SCNCapsule/init(capRadius:height:))

Creates a capsule geometry with the specified radius and height.

### Adjusting a Capsule’s Dimensions

[`capRadius`](/documentation/SceneKit/SCNCapsule/capRadius)

The radius both of the capsule’s circular center cross section and of its hemispherical ends. Animatable.

[`height`](/documentation/SceneKit/SCNCapsule/height)

The extent of the capsule along its y-axis. Animatable.

### Adjusting Geometric Detail

[`radialSegmentCount`](/documentation/SceneKit/SCNCapsule/radialSegmentCount)

The number of subdivisions around the lateral circumference of the capsule. Animatable.

[`capSegmentCount`](/documentation/SceneKit/SCNCapsule/capSegmentCount)

The number of subdivisions in the height of each hemispherical end of the capsule. Animatable.

[`heightSegmentCount`](/documentation/SceneKit/SCNCapsule/heightSegmentCount)

The number of subdivisions in the sides of the capsule along its y-axis. Animatable.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)