Difference between revisions of "Transform:transformPoint"

(Created page)
 
m (0.11.0 -> 11.0)
 
Line 1: Line 1:
{{newin|[[0.11.0]]|110|type=function}}
+
{{newin|[[11.0]]|110|type=function}}
 
Applies the Transform object's transformation to the given 2D position.
 
Applies the Transform object's transformation to the given 2D position.
  

Latest revision as of 19:30, 7 May 2019

Available since LÖVE 11.0
This function is not supported in earlier versions.

Applies the Transform object's transformation to the given 2D position.

This effectively converts the given position from global coordinates into the local coordinate space of the Transform.

Function

Synopsis

localX, localY = Transform:transformPoint( globalX, globalY )

Arguments

number globalX
The x component of the position in global coordinates.
number globalY
The y component of the position in global coordinates.

Returns

number localX
The x component of the position with the transform applied.
number localY
The y component of the position with the transform applied.

See Also

Other Languages