setLinearDamping.lua 892 B

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