summaryrefslogtreecommitdiff
path: root/meta/3rd/love2d/library
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-03-27 16:52:21 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-03-27 16:52:21 +0800
commit3a761da3d574639aac1f7ef06b1976bf3f255ad3 (patch)
treee111922875f3007fcf7c7e9f803c0191607ce45e /meta/3rd/love2d/library
parent4399ca74c753c8822a62a2174ab2f47cefe98dca (diff)
downloadlua-language-server-3a761da3d574639aac1f7ef06b1976bf3f255ad3.zip
update love-api
Diffstat (limited to 'meta/3rd/love2d/library')
-rw-r--r--meta/3rd/love2d/library/love/physics.lua14
1 files changed, 6 insertions, 8 deletions
diff --git a/meta/3rd/love2d/library/love/physics.lua b/meta/3rd/love2d/library/love/physics.lua
index 616e4791..82ea008a 100644
--- a/meta/3rd/love2d/library/love/physics.lua
+++ b/meta/3rd/love2d/library/love/physics.lua
@@ -3122,14 +3122,12 @@ function World:queryBoundingBox(topLeftX, topLeftY, bottomRightX, bottomRightY,
---
---[Open in Browser](https://love2d.org/wiki/World:rayCast)
---
----@param fixture love.Fixture # The fixture intersecting the ray.
----@param x number # The x position of the intersection point.
----@param y number # The y position of the intersection point.
----@param xn number # The x value of the surface normal vector of the shape edge.
----@param yn number # The y value of the surface normal vector of the shape edge.
----@param fraction number # The position of the intersection on the ray as a number from 0 to 1 (or even higher if the ray length was changed with the return value).
----@return number control # The ray can be controlled with the return value. A positive value sets a new ray length where 1 is the default value. A value of 0 terminates the ray. If the callback function returns -1, the intersection gets ignored as if it didn't happen.
-function World:rayCast(fixture, x, y, xn, yn, fraction) end
+---@param x1 number # The x position of the starting point of the ray.
+---@param y1 number # The x position of the starting point of the ray.
+---@param x2 number # The x position of the end point of the ray.
+---@param y2 number # The x value of the surface normal vector of the shape edge.
+---@param callback function # A function called for each fixture intersected by the ray. The function gets six arguments and should return a number as a control value. The intersection points fed into the function will be in an arbitrary order. If you wish to find the closest point of intersection, you'll need to do that yourself within the function. The easiest way to do that is by using the fraction value.
+function World:rayCast(x1, y1, x2, y2, callback) end
---
---Sets functions for the collision callbacks during the world update.