Jelajahi Sumber

Fix :overlapShape docs;

bjorn 4 bulan lalu
induk
melakukan
be8963476a
2 mengubah file dengan 28 tambahan dan 4 penghapusan
  1. 24 0
      api/init.lua
  2. 4 4
      api/lovr/physics/World/overlapShape.lua

+ 24 - 0
api/init.lua

@@ -42952,6 +42952,12 @@ return {
                       type = "number",
                       description = "The z component of the axis of rotation."
                     },
+                    {
+                      name = "maxDistance",
+                      type = "number",
+                      description = "The maximum distance at which a shape can be detected, in meters.  Zero will detect shapes touching the input shape, 1.0 will detect shapes within 1 meter of the input shape, etc.",
+                      default = "0"
+                    },
                     {
                       name = "filter",
                       type = "string",
@@ -42983,6 +42989,12 @@ return {
                       type = "Quat",
                       description = "The orientation of the shape."
                     },
+                    {
+                      name = "maxDistance",
+                      type = "number",
+                      description = "The maximum distance at which a shape can be detected, in meters.  Zero will detect shapes touching the input shape, 1.0 will detect shapes within 1 meter of the input shape, etc.",
+                      default = "0"
+                    },
                     {
                       name = "filter",
                       type = "string",
@@ -43039,6 +43051,12 @@ return {
                       type = "number",
                       description = "The z component of the axis of rotation."
                     },
+                    {
+                      name = "maxDistance",
+                      type = "number",
+                      description = "The maximum distance at which a shape can be detected, in meters.  Zero will detect shapes touching the input shape, 1.0 will detect shapes within 1 meter of the input shape, etc.",
+                      default = "0"
+                    },
                     {
                       name = "filter",
                       type = "string",
@@ -43106,6 +43124,12 @@ return {
                       type = "Quat",
                       description = "The orientation of the shape."
                     },
+                    {
+                      name = "maxDistance",
+                      type = "number",
+                      description = "The maximum distance at which a shape can be detected, in meters.  Zero will detect shapes touching the input shape, 1.0 will detect shapes within 1 meter of the input shape, etc.",
+                      default = "0"
+                    },
                     {
                       name = "filter",
                       type = "string",

+ 4 - 4
api/lovr/physics/World/overlapShape.lua

@@ -110,19 +110,19 @@ return {
   },
   variants = {
     {
-      arguments = { 'shape', 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az', 'filter', 'callback' },
+      arguments = { 'shape', 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az', 'maxDistance', 'filter', 'callback' },
       returns = {}
     },
     {
-      arguments = { 'shape', 'position', 'orientation', 'filter', 'callback' },
+      arguments = { 'shape', 'position', 'orientation', 'maxDistance', 'filter', 'callback' },
       returns = {}
     },
     {
-      arguments = { 'shape', 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az', 'filter' },
+      arguments = { 'shape', 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az', 'maxDistance', 'filter' },
       returns = { 'collider', 'shape', 'x', 'y', 'z', 'nx', 'ny', 'nz' }
     },
     {
-      arguments = { 'shape', 'position', 'orientation', 'filter' },
+      arguments = { 'shape', 'position', 'orientation', 'maxDistance', 'filter' },
       returns = { 'collider', 'shape', 'x', 'y', 'z', 'nx', 'ny', 'nz' }
     }
   },