Browse Source

Fix World:shapecast;

bjorn 10 months ago
parent
commit
b6d52f95f8
2 changed files with 24 additions and 4 deletions
  1. 20 0
      api/init.lua
  2. 4 4
      api/lovr/physics/World/shapecast.lua

+ 20 - 0
api/init.lua

@@ -41946,6 +41946,11 @@ return {
               variants = {
               variants = {
                 {
                 {
                   arguments = {
                   arguments = {
+                    {
+                      name = "shape",
+                      type = "Shape",
+                      description = "The Shape to cast."
+                    },
                     {
                     {
                       name = "x1",
                       name = "x1",
                       type = "number",
                       type = "number",
@@ -42057,6 +42062,11 @@ return {
                 },
                 },
                 {
                 {
                   arguments = {
                   arguments = {
+                    {
+                      name = "shape",
+                      type = "Shape",
+                      description = "The Shape to cast."
+                    },
                     {
                     {
                       name = "position",
                       name = "position",
                       type = "Vec3",
                       type = "Vec3",
@@ -42133,6 +42143,11 @@ return {
                 },
                 },
                 {
                 {
                   arguments = {
                   arguments = {
+                    {
+                      name = "shape",
+                      type = "Shape",
+                      description = "The Shape to cast."
+                    },
                     {
                     {
                       name = "x1",
                       name = "x1",
                       type = "number",
                       type = "number",
@@ -42235,6 +42250,11 @@ return {
                 },
                 },
                 {
                 {
                   arguments = {
                   arguments = {
+                    {
+                      name = "shape",
+                      type = "Shape",
+                      description = "The Shape to cast."
+                    },
                     {
                     {
                       name = "position",
                       name = "position",
                       type = "Vec3",
                       type = "Vec3",

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

@@ -157,19 +157,19 @@ return {
   },
   },
   variants = {
   variants = {
     {
     {
-      arguments = { 'x1', 'y1', 'z1', 'x2', 'y2', 'z2', 'angle', 'ax', 'ay', 'az', 'filter', 'callback' },
+      arguments = { 'shape', 'x1', 'y1', 'z1', 'x2', 'y2', 'z2', 'angle', 'ax', 'ay', 'az', 'filter', 'callback' },
       returns = {}
       returns = {}
     },
     },
     {
     {
-      arguments = { 'position', 'destination', 'orientation', 'filter', 'callback' },
+      arguments = { 'shape', 'position', 'destination', 'orientation', 'filter', 'callback' },
       returns = {}
       returns = {}
     },
     },
     {
     {
-      arguments = { 'x1', 'y1', 'z1', 'x2', 'y2', 'z2', 'angle', 'ax', 'ay', 'az', 'filter' },
+      arguments = { 'shape', 'x1', 'y1', 'z1', 'x2', 'y2', 'z2', 'angle', 'ax', 'ay', 'az', 'filter' },
       returns = { 'collider', 'shape', 'x', 'y', 'z', 'nx', 'ny', 'nz' }
       returns = { 'collider', 'shape', 'x', 'y', 'z', 'nx', 'ny', 'nz' }
     },
     },
     {
     {
-      arguments = { 'position', 'destination', 'orientation', 'filter' },
+      arguments = { 'shape', 'position', 'destination', 'orientation', 'filter' },
       returns = { 'collider', 'shape', 'x', 'y', 'z', 'nx', 'ny', 'nz' }
       returns = { 'collider', 'shape', 'x', 'y', 'z', 'nx', 'ny', 'nz' }
     }
     }
   },
   },