Skip to content

format

typescript
CapsuleCollider.radius

class: CapsuleCollider

description

The radius of the capsule collider.

This value represents the radius of the cylindrical part of the capsule, excluding the radius of the two hemispheres.

parameter

param_nametypedescription

reture

typedescription
numberThe radius of the capsule collider.

code example

typescript
let obj = new GameObject();
let com = obj.AddComponent<CapsuleCollider>(CapsuleCollider);
com.radius;