Difference between revisions of "Transform:inverseTransformPoint"
(Created page) |
m (0.11.0 -> 11.0) |
||
Line 1: | Line 1: | ||
− | {{newin|[[ | + | {{newin|[[11.0]]|110|type=function}} |
Applies the reverse of the Transform object's transformation to the given 2D position. | Applies the reverse of the Transform object's transformation to the given 2D position. | ||
Latest revision as of 18:30, 7 May 2019
Available since LÖVE 11.0 |
This function is not supported in earlier versions. |
Applies the reverse of the Transform object's transformation to the given 2D position.
This effectively converts the given position from the local coordinate space of the Transform into global coordinates.
One use of this method can be to convert a screen-space mouse position into global world coordinates, if the given Transform has transformations applied that are used for a camera system in-game.
Function
Synopsis
globalX, globalY = Transform:inverseTransformPoint( localX, localY )
Arguments
number localX
- The x component of the position with the transform applied.
number localY
- The y component of the position with the transform applied.
Returns
number globalX
- The x component of the position in global coordinates.
number globalY
- The y component of the position in global coordinates.
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