Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


CapsuleGeometry

Contains the basic geometric shape of a capsule.
Read time 1 minuteLast updated 5 days ago

Definition

public struct CapsuleGeometry : IGeometry

Remarks

When Unity retrieves the geometry from the CapsuleCollider, the _direction is not included. For this reason, you should assume the direction is always along the X axis.

Constructors

Constructor

Description

CapsuleGeometry(System.Single,System.Single)Create a capsule shape with the provided parameters.

Properties

Property

Description

GeometryTypeReturns the geometry type of this shape, which is CapsuleGeometry.
HalfLengthThe distance from the center of the shape to the center of either half-sphere at the caps.
RadiusThe radius of the half-sphere at either cap of the capsule.