Guest User

Untitled

a guest
Jul 19th, 2021
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. local NonMassBasedimpactEnergy = 0
  2. if detectA then
  3. NonMassBasedimpactEnergy = NonMassBasedimpactEnergy + objectAPointVelocity:length2()
  4. end
  5. if detectB then
  6. NonMassBasedimpactEnergy = NonMassBasedimpactEnergy + objectBPointVelocity:length2()
  7. end
  8. local FinalHitForce = NonMassBasedimpactEnergy / 200
  9. FinalHitForce = FinalHitForce - 0.5
  10. if FinalHitForce < 0 then FinalHitForce = 0 end
  11. local destructionRadius = FinalHitForce
  12. local impulseRadius = FinalHitForce
  13. local magnitude = FinalHitForce
  14. if FinalHitForce > 0 then
  15. sm.physics.explode( collisionPosition, 9, destructionRadius, impulseRadius, magnitude, nil, nil )
  16. end
Advertisement
Add Comment
Please, Sign In to add comment