Get the screen space position for a 2d camera world space position
raylib.InitWindow 800, 600, "World To Screen 2D Demo" cam = {offset:[0,0], target:[0,0], rotation:0, zoom:1} while not raylib.WindowShouldClose raylib.BeginDrawing raylib.ClearBackground color.white raylib.BeginMode2D cam raylib.DrawCircle 100, 100, 20, color.blue raylib.EndMode2D screenPos = raylib.GetWorldToScreen2D([100,100], cam) raylib.DrawText "Screen: " + screenPos[0] + "," + screenPos[1], 10, 10, 20, color.black raylib.EndDrawing end while raylib.CloseWindow
There was an error while loading. Please reload this page.