applyForce.lua 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. return {
  2. summary = 'Apply a force to the Collider.',
  3. description = 'Applies a force to the Collider.',
  4. arguments = {
  5. x = {
  6. type = 'number',
  7. description = 'The x component of the force to apply.'
  8. },
  9. y = {
  10. type = 'number',
  11. description = 'The y component of the force to apply.'
  12. },
  13. z = {
  14. type = 'number',
  15. description = 'The z component of the force to apply.'
  16. },
  17. px = {
  18. type = 'number',
  19. description = 'The x position to apply the force at, in world coordinates.'
  20. },
  21. py = {
  22. type = 'number',
  23. description = 'The y position to apply the force at, in world coordinates.'
  24. },
  25. pz = {
  26. type = 'number',
  27. description = 'The z position to apply the force at, in world coordinates.'
  28. }
  29. },
  30. returns = {},
  31. variants = {
  32. {
  33. arguments = { 'x', 'y', 'z' },
  34. returns = {}
  35. },
  36. {
  37. arguments = { 'x', 'y', 'z', 'px', 'py', 'pz' },
  38. returns = {}
  39. }
  40. },
  41. notes = [[
  42. If the Collider is asleep, it will need to be woken up with `Collider:setAwake` for this
  43. function to have any affect.
  44. ]],
  45. related = {
  46. 'Collider:applyTorque'
  47. }
  48. }