Difference between revisions of "World:rayCast"
m (Fixed typo in function arguments.) |
|||
Line 5: | Line 5: | ||
=== Synopsis === | === Synopsis === | ||
<source lang="lua"> | <source lang="lua"> | ||
− | World:rayCast( x1, y1, | + | World:rayCast( x1, y1, x2, y2, callback ) |
</source> | </source> | ||
+ | |||
=== Arguments === | === Arguments === | ||
{{param|number|x1|The x position of the starting point of the ray.}} | {{param|number|x1|The x position of the starting point of the ray.}} |
Revision as of 06:15, 29 April 2012
Available since LÖVE 0.8.0 |
This method is not supported in earlier versions. |
Casts a ray and calls a function with the fixtures that intersect it.
Function
Synopsis
World:rayCast( x1, y1, x2, y2, callback )
Arguments
number x1
- The x position of the starting point of the ray.
number y1
- The y position of the starting point of the ray.
number x2
- The x position of the end point of the ray.
number y2
- The y position of the end point of the ray.
function callback
- This function gets six arguments and should return a number.
Returns
Nothing.
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info