mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-26 22:10:17 +00:00
randomize lifetime of detached parts
This commit is contained in:
parent
bfb15e4c9c
commit
b0cde397be
1 changed files with 1 additions and 1 deletions
|
@ -159,7 +159,7 @@ namespace SanAndreasUnity.Behaviours.Vehicles
|
|||
rigidBody.maxDepenetrationVelocity = VehicleManager.Instance.explosionLeftoverPartsMaxDepenetrationVelocity;
|
||||
rigidBody.AddExplosionForce(explosionForce, explosionCenter, explosionRadius);
|
||||
|
||||
Object.Destroy(meshFilter.gameObject, VehicleManager.Instance.explosionLeftoverPartsLifetime);
|
||||
Object.Destroy(meshFilter.gameObject, VehicleManager.Instance.explosionLeftoverPartsLifetime * Random.Range(0.8f, 1.2f));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue