toGlobal

fun toGlobal(point: Vec2f): Vec2f
fun toGlobal(x: Float, y: Float): Vec2f

Transforms the provided local position into a position in global coordinate space. The input is expected to be local relative to the Node2D it is called on. e.g. Applying this method to the positions of child nodes will correctly transform their positions into the global coordinate space, but applying it to a node's own position will give an incorrect result, as it will incorporate the node's own transformation into its global position.