newMeshCollider.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. return {
  2. tag = 'colliders',
  3. summary = 'Add a Collider with a MeshShape to the World.',
  4. description = 'Adds a new Collider to the World with a MeshShape already attached.',
  5. arguments = {
  6. vertices = {
  7. type = 'table',
  8. description = 'The table of vertices in the mesh. Each vertex is a table with 3 numbers.'
  9. },
  10. indices = {
  11. type = 'table',
  12. description = [[
  13. A table of triangle indices representing how the vertices are connected in the Mesh.
  14. ]]
  15. },
  16. model = {
  17. type = 'Model',
  18. description = [[
  19. A Model to use for the mesh data. Similar to calling `Model:getTriangles` and passing it to
  20. this function, but has better performance.
  21. ]]
  22. }
  23. },
  24. returns = {
  25. collider = {
  26. type = 'Collider',
  27. description = 'The new Collider.'
  28. }
  29. },
  30. variants = {
  31. {
  32. arguments = { 'vertices', 'indices' },
  33. returns = { 'collider' }
  34. },
  35. {
  36. arguments = { 'model' },
  37. returns = { 'collider' }
  38. }
  39. },
  40. related = {
  41. 'Collider',
  42. 'World:newCollider',
  43. 'World:newBoxCollider',
  44. 'World:newCapsuleCollider',
  45. 'World:newCylinderCollider',
  46. 'World:newSphereCollider',
  47. 'World:newTerrainCollider',
  48. 'Model:getTriangles'
  49. }
  50. }