setRestitution.lua 557 B

123456789101112131415161718192021
  1. return {
  2. summary = 'Set the bounciness of the Collider.',
  3. description = [[
  4. Sets the restitution (bounciness) of the Collider. By default, the restitution of two Colliders
  5. is combined (the max is used) when they collide to cause them to bounce away from each other.
  6. The initial restitution is 0.
  7. ]],
  8. arguments = {
  9. {
  10. name = 'restitution',
  11. type = 'number',
  12. description = 'The new restitution.'
  13. }
  14. },
  15. returns = {},
  16. related = {
  17. 'Collider:getFriction',
  18. 'Collider:setFriction',
  19. 'World:collide'
  20. }
  21. }