public float theForce;
public float theRadius;
theGameObject.AddComponent<Rigidbody>().AddExplosionForce(theForce, transform.position, theRadius);
theForce and theRadius are public floats. No matter what I adjust them to the explosion is too powerful. I tried using negative values to see if it would implode, still the same high velocity explosion. I’ve even tried very small numbers such as .0000000000001, and no difference. Anyone know if there is some bug here or am I doing something wrong?
You are applying the explosion at the objects center, which will make it have extreme/unpredictable responses. Move the explosion force to a better position. Your are doing the equivalent of an atomic bomb inside your game object, not beside it. Hope this helps
I’ve successfully used explosion force recently in a similar way. Yeah one problem I see that’s already been mentioned is the explosion position; it won’t have proper results in the center.
I also used explosionforce from a component on the gameObject being exploded, it worked fine.
I noticed however that the amount of force needs to be fairly high relative to the mass. For objects 1-10 in mass, I had to use force in the thousands (1000-10,000 should launch the object quite a bit).
Another thing to consider is the object’s scale. Since force causes acceleration which is distance over time, a very large object covers a lot of distance so movement won’t be as noticable without adjusting speed/forces accordingly. My objects with the settings I mentioned above (1-10 mass, 1000-10,000 explosion force) are sized 1-5 unity units. Remember 1 unity unit resembles 1 meter for the physics engine (anything to do with velocity, which is meters/unity units per second).
Lastly drag and friction are important factors as well, as they slow down movement, decrease accelerations, and increase decelerations.