<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/MeshResource/generateCylinder(height:radius:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation12MeshResourceC16generateCylinder6height6radiusACSf_SftFZ"
  },
  "title" : "generateCylinder(height:radius:)"
}
-->

# generateCylinder(height:radius:)

Creates a new cylinder mesh with the specified dimensions.

```
@MainActor @preconcurrency static func generateCylinder(height: Float, radius: Float) -> MeshResource
```

## Parameters

`height`

The height of the cylinder, in meters, along the y-axis.

`radius`

The radius of the cylinder, in meters.

## Discussion

The cylinder is centered at the local origin with its axis aligned along
the y-axis.

---

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)