setLinearDamping.lua 924 B

1234567891011121314151617181920212223242526272829303132
  1. return {
  2. summary = 'Set the linear damping of the Collider.',
  3. description = [[
  4. Sets the Collider's linear damping parameter. Linear damping is similar to drag or air
  5. resistance, slowing the Collider down over time. Damping is only applied when linear
  6. velocity is over the threshold value.
  7. ]],
  8. arguments = {
  9. {
  10. name = 'damping',
  11. type = 'number',
  12. description = 'The linear damping.'
  13. },
  14. {
  15. name = 'threshold',
  16. type = 'number',
  17. default = '0',
  18. description = 'Velocity limit below which the damping is not applied.'
  19. }
  20. },
  21. returns = {},
  22. notes = [[
  23. A linear damping of 0 means the Collider won't slow down over time. This is the default.
  24. Linear damping can also be set on the World using `World:setLinearDamping`, which will affect
  25. all new colliders.
  26. ]],
  27. related = {
  28. 'World:getLinearDamping',
  29. 'World:setLinearDamping'
  30. }
  31. }