format
typescript
SphereCollider.centerclass: SphereCollider
description
The center position of the sphere collider.
The center point position is an offset relative to the local coordinate system of the game object.
parameter
| param_name | type | description |
|---|
reture
| type | description |
|---|---|
Vector3 | The coordinates of the center position. |
code example
javascript
let obj = new GameObject();
let com = obj.AddComponent<SphereCollider>(SphereCollider);
com.center = new Vector3(0, 0, 1);
Debug.Log("SphereCollider: center = ", com.center);