getWorldToScreen2D function

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

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

Implementation

Vector2 getWorldToScreen2D(Vector2 position, Camera2D camera) {
  return Vector2.fromRef(library.GetWorldToScreen2D(position.ref, camera.ref));
}