format
typescript
CapsuleCollider.centerclass: 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_name | type | description |
|---|
reture
| type | description |
|---|---|
Vector3 | The 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);