newCapsuleShape.lua 843 B

123456789101112131415161718192021222324252627282930313233
  1. return {
  2. tag = 'shapes',
  3. summary = 'Create a new CapsuleShape.',
  4. description = 'Creates a new CapsuleShape. Capsules are cylinders with hemispheres on each end.',
  5. arguments = {
  6. {
  7. name = 'radius',
  8. type = 'number',
  9. default = '1',
  10. description = 'The radius of the capsule, in meters.'
  11. },
  12. {
  13. name = 'length',
  14. type = 'number',
  15. default = '1',
  16. description = 'The length of the capsule, not including the caps, in meters.'
  17. }
  18. },
  19. returns = {
  20. {
  21. name = 'capsule',
  22. type = 'CapsuleShape',
  23. description = 'The new CapsuleShape.'
  24. }
  25. },
  26. notes = 'A Shape can be attached to a Collider using `Collider:addShape`.',
  27. related = {
  28. 'CapsuleShape',
  29. 'lovr.physics.newBoxShape',
  30. 'lovr.physics.newCylinderShape',
  31. 'lovr.physics.newSphereShape'
  32. }
  33. }