Sphere Constructor
Sphere(Vector3, float)
Create a new sphere from a center position and radius.
Declaration
public Sphere(Vector3 center, float radius)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | center | The center position of the sphere, Center. |
float | radius | The radius of the sphere, Radius. |
Sphere(SphereCollider)
Create a Sphere in world space from a UnityEngine.SphereCollider.
Remarks
Because the new Sphere is in world space, this constructor reads from collider
.UnityEngine.Collider.bounds.
Declaration
public Sphere(SphereCollider collider)
Parameters
Type | Name | Description |
---|---|---|
SphereCollider | collider | The collider to read from. |