- Home /
Radial Explosion with a sphere collider.,Sphere collider for radial explosion
To simulate a radial explosion I used a sphere collider inside a "bomb" object stationary in space containing a rigidbody. Around the boom object there are a few dozen "target" objects each having a box collider but without rigidbody.
When I activate the explosion, and the radius of the sphere collider increases, the target objects are destroyed correctly but the CPU processing becomes very slow.
It ranges from a minimum of 10ms when the bomb does not explode, to around 3.5 sec for the duration of the explosion.
the duration of the explosion is about 2 sec.
Is it a concept error to use a sphere collider to do this, or is there something else?
Thanks in advance.,Hi.
I try to create a simple radial explosion with a sphere collider inside an object fixed on the space and containing a rigidbody with all constraints (position,rotation) enabled. Around my "bomb" object, there are several dozen of other "target" objects with a box collider and without rigidbody.
So, when I vary the radius value to simulate explosion propagation, the target object are correctly crashed relating its their distance from the bomb, but all cpu processing is very high.
it ranges from about 10 ms when bomb has not yet exploded, to about 3.5 sec during the explosion.
Is it a concept error to use a sphere collider to do this, or is there something else?
Thanks in advance.
Did you tried to use Physics.OverlapSphere()
? You do not need any collider attached to the GameObject. Here is a link to the Unity Documentation.
Your answer
Follow this Question
Related Questions
Sphere Colliders Diminishing Returns 0 Answers
Sphere Colliders on parent object and child object 1 Answer
how do i enable collider on particale system from when its diabled 0 Answers
raycast to select transform but not sphere collider 2 Answers
Unexpected position of contact point from sphere-sphere or sphere-capsule colliders 0 Answers