getLinearDamping.lua 967 B

1234567891011121314151617181920212223242526272829303132333435
  1. return {
  2. tag = 'worldProperties',
  3. summary = 'Get the linear damping of the World.',
  4. description = [[
  5. Returns the linear damping parameters of the World. Linear damping is similar to drag or air
  6. resistance, slowing down colliders over time as they move.
  7. ]],
  8. arguments = {},
  9. returns = {
  10. damping = {
  11. type = 'number',
  12. description = 'The linear damping.'
  13. },
  14. threshold = {
  15. type = 'number',
  16. description = 'Velocity limit below which the damping is not applied.'
  17. }
  18. },
  19. variants = {
  20. {
  21. arguments = {},
  22. returns = { 'damping', 'threshold' }
  23. }
  24. },
  25. notes = [[
  26. A linear damping of 0 means colliders won't slow down over time. This is the default.
  27. This sets the default damping for newly-created colliders. Damping can also be set on a
  28. per-collider basis using `Collider:setLinearDamping`.
  29. ]],
  30. related = {
  31. 'Collider:getLinearDamping',
  32. 'Collider:setLinearDamping'
  33. }
  34. }