getLinearDamping.lua 829 B

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