Skip to content

format

typescript
CapsuleCollider.center

class: CapsuleCollider

description

The center point position of the capsule collider.

This value represents the center point position of the capsule collider in the local coordinate system of the game object.

parameter

param_nametypedescription

reture

typedescription
Vector3The coordinates of the center point.

code example

javascript
let obj = new GameObject();
let com = obj.AddComponent<CapsuleCollider>(CapsuleCollider);
com.center = new Vector3(0, 0, 1);
Debug.Log("CapsuleCollider: center = ", com.center);