format
typescript
Rigidbody.AddExplosionForce(explosionForce, explosionPosition, explosionRadius, upwardsModifier, mode)class: Rigidbody
description
Applies a force to rigidbodies to simulate an explosion effect.
This method is commonly used to simulate explosion effects, such as throwing grenades or using explosive objects in a game. When an explosion occurs, you can call this method to apply an explosion force to surrounding rigidbodies, creating a realistic impact effect.
parameter
| param_name | type | description |
|---|---|---|
| explosionForce | number | The force of the explosion. |
| explosionPosition | Vector3 | The center of the sphere in world coordinates where the explosion affects. |
| explosionRadius | number | The radius of the sphere in which the explosion affects. |
| upwardsModifier | number | Adjusts the apparent position of the explosion. |
| mode | ForceMode | The method used to apply the force to its targets. |
reture
| type | description |
|---|---|
void |
