setLinearVelocity.lua 987 B

1234567891011121314151617181920212223242526272829303132333435
  1. return {
  2. summary = 'Set the linear velocity of the Collider.',
  3. description = [[
  4. Sets the linear velocity of the Collider directly. Usually it's preferred to use
  5. `Collider:applyForce` to change velocity since instantaneous velocity changes can lead to weird
  6. glitches.
  7. ]],
  8. arguments = {
  9. {
  10. name = 'vx',
  11. type = 'number',
  12. description = 'The x velocity of the Collider, in meters per second.'
  13. },
  14. {
  15. name = 'vy',
  16. type = 'number',
  17. description = 'The y velocity of the Collider, in meters per second.'
  18. },
  19. {
  20. name = 'vz',
  21. type = 'number',
  22. description = 'The z velocity of the Collider, in meters per second.'
  23. }
  24. },
  25. returns = {},
  26. related = {
  27. 'Collider:getLinearVelocityFromLocalPoint',
  28. 'Collider:getLinearVelocityFromWorldPoint',
  29. 'Collider:getAngularVelocity',
  30. 'Collider:setAngularVelocity',
  31. 'Collider:applyForce',
  32. 'Collider:getPosition',
  33. 'Collider:setPosition'
  34. }
  35. }