newSliderJoint.lua 1.3 KB

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