newSphereCollider.lua 1.4 KB

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