float
radius = 10.0F;
float
power = 1000.0F;
Collider[] colliders = Physics.OverlapSphere (_transform.position, radius);
foreach
(Collider col
in
colliders)
{
if
(col.rigidbody)
{
if
(col.rigidbody != gameObject.rigidbody)
{
col.rigidbody.AddExplosionForce (power, _transform.position, radius);
}
}
}
댓글 없음:
댓글 쓰기