newCapsuleCollider.lua 1.5 KB

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