getScreenToWorld2D function

Vector2 getScreenToWorld2D(
  1. Vector2 position,
  2. Camera2D camera
)

Get the world space position for a 2d camera screen space position.

Implementation

Vector2 getScreenToWorld2D(Vector2 position, Camera2D camera) {
  return Vector2.fromRef(library.GetScreenToWorld2D(position.ref, camera.ref));
}