setLinearDamping.lua 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. damping = {
  11. type = 'number',
  12. description = 'The linear damping.'
  13. },
  14. threshold = {
  15. type = 'number',
  16. default = '0',
  17. description = 'Velocity limit below which the damping is not applied.'
  18. }
  19. },
  20. returns = {},
  21. variants = {
  22. {
  23. arguments = { 'damping', 'threshold' },
  24. returns = {}
  25. }
  26. },
  27. notes = [[
  28. A linear damping of 0 means colliders won't slow down over time. This is the default.
  29. This sets the default damping for newly-created colliders. Damping can also be set on a
  30. per-collider basis using `Collider:setLinearDamping`.
  31. ]],
  32. related = {
  33. 'Collider:getLinearDamping',
  34. 'Collider:setLinearDamping'
  35. }
  36. }