ColliderExtensions.RandomPointInside

Extension Method in ColliderExtensions

Declaration

public static Vector3 RandomPointInside(this Collider collider)

Description

Returns a random point inside the collider's bounds.

Parameters

colliderThe collider to get a random point from.

Returns

Vector3A random point inside the collider's bounds.

Overload

Declaration

public static Vector2 RandomPointInside(this Collider2D collider)

Description

Returns a random point inside the collider's bounds.

Parameters

colliderThe collider to get a random point from.

Returns

Vector2A random point inside the collider's bounds.