newBoxCollider.lua 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. return {
  2. tag = 'colliders',
  3. summary = 'Add a Collider with a BoxShape to the World.',
  4. description = 'Adds a new Collider to the World with a BoxShape already attached.',
  5. arguments = {
  6. x = {
  7. type = 'number',
  8. default = '0',
  9. description = 'The x coordinate of the center of the box.'
  10. },
  11. y = {
  12. type = 'number',
  13. default = '0',
  14. description = 'The y coordinate of the center of the box.'
  15. },
  16. z = {
  17. type = 'number',
  18. default = '0',
  19. description = 'The z coordinate of the center of the box.'
  20. },
  21. width = {
  22. type = 'number',
  23. default = '1',
  24. description = 'The total width of the box, in meters.'
  25. },
  26. height = {
  27. type = 'number',
  28. default = 'width',
  29. description = 'The total height of the box, in meters.'
  30. },
  31. depth = {
  32. type = 'number',
  33. default = 'width',
  34. description = 'The total depth of the box, in meters.'
  35. },
  36. position = {
  37. type = 'Vec3',
  38. description = 'The position of the center of the box, in meters.'
  39. },
  40. size = {
  41. type = 'Vec3',
  42. description = 'The size of the box, in meters.'
  43. }
  44. },
  45. returns = {
  46. collider = {
  47. type = 'Collider',
  48. description = 'The new Collider.'
  49. }
  50. },
  51. variants = {
  52. {
  53. arguments = { 'x', 'y', 'z', 'width', 'height', 'depth' },
  54. returns = { 'collider' }
  55. },
  56. {
  57. arguments = { 'position', 'size' },
  58. returns = { 'collider' }
  59. }
  60. },
  61. related = {
  62. 'BoxShape',
  63. 'Collider',
  64. 'World:newCollider',
  65. 'World:newCapsuleCollider',
  66. 'World:newCylinderCollider',
  67. 'World:newMeshCollider',
  68. 'World:newSphereCollider',
  69. 'World:newTerrainCollider'
  70. }
  71. }