getLinearDamping.lua 884 B

12345678910111213141516171819202122232425262728293031323334
  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. damping = {
  10. type = 'number',
  11. description = 'The linear damping.'
  12. },
  13. threshold = {
  14. type = 'number',
  15. description = 'Velocity limit below which the damping is not applied.'
  16. }
  17. },
  18. variants = {
  19. {
  20. arguments = {},
  21. returns = { 'damping', 'threshold' }
  22. }
  23. },
  24. notes = [[
  25. When the Collider is created, it will use the world's linear damping value, which is set using
  26. `World:setLinearDamping`.
  27. A linear damping of 0 means the Collider won't slow down over time.
  28. ]],
  29. related = {
  30. 'World:getLinearDamping',
  31. 'World:setLinearDamping'
  32. }
  33. }