isCollisionEnabledBetween.lua 978 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. return {
  2. tag = 'worldCollision',
  3. summary = 'Check if two tags can collide.',
  4. description = 'Returns whether collisions are currently enabled between two tags.',
  5. arguments = {
  6. tag1 = {
  7. type = 'string',
  8. default = 'nil',
  9. description = 'The first tag, or `nil` to use a wildcard.'
  10. },
  11. tag2 = {
  12. type = 'string',
  13. default = 'nil',
  14. description = 'The second tag, or `nil` to use a wildcard.'
  15. }
  16. },
  17. returns = {
  18. enabled = {
  19. type = 'boolean',
  20. description = 'Whether or not two colliders with the specified tags will collide.'
  21. }
  22. },
  23. variants = {
  24. {
  25. arguments = { 'tag1', 'tag2' },
  26. returns = { 'enabled' }
  27. }
  28. },
  29. notes = [[
  30. Tags must be set up when creating the World, see `lovr.physics.newWorld`.
  31. By default, collision is enabled between all tags.
  32. ]],
  33. related = {
  34. 'lovr.physics.newWorld',
  35. 'World:disableCollisionBetween',
  36. 'World:enableCollisionBetween'
  37. }
  38. }