newSliderJoint.lua 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. return {
  2. tag = 'joints',
  3. summary = 'Create a new SliderJoint.',
  4. description = 'Creates a new SliderJoint.',
  5. arguments = {
  6. {
  7. name = 'colliderA',
  8. type = 'Collider',
  9. description = 'The first collider to attach the Joint to.'
  10. },
  11. {
  12. name = 'colliderB',
  13. type = 'Collider',
  14. description = 'The second collider to attach the Joint to.'
  15. },
  16. {
  17. name = 'ax',
  18. type = 'number',
  19. description = 'The x component of the slider axis.'
  20. },
  21. {
  22. name = 'ay',
  23. type = 'number',
  24. description = 'The y component of the slider axis.'
  25. },
  26. {
  27. name = 'az',
  28. type = 'number',
  29. description = 'The z component of the slider axis.'
  30. }
  31. },
  32. returns = {
  33. {
  34. name = 'slider',
  35. type = 'SliderJoint',
  36. description = 'The new SliderJoint.'
  37. }
  38. },
  39. notes = [[
  40. A slider joint constrains two colliders to only allow movement along the slider's axis.
  41. ]],
  42. related = {
  43. 'lovr.physics.newBallJoint',
  44. 'lovr.physics.newDistanceJoint',
  45. 'lovr.physics.newHingeJoint'
  46. }
  47. }