-
Notifications
You must be signed in to change notification settings - Fork 2
raylib.GetWorldToScreenEx
JoeStrout edited this page Apr 29, 2026
·
2 revisions
Get size position for a 3d world space position (useful for texture drawing)
| Parameter | Default Value | Note |
|---|---|---|
| position | ||
| camera | ||
| width | 0 | |
| height | 0 |
| Condition | Return Value |
|---|---|
| (always) | list |
raylib.InitWindow 800, 600, "World To Screen Ex Demo"
cam = {position:[0,5,10], target:[0,0,0], up:[0,1,0], fovy:45, projection:raylib.CAMERA_PERSPECTIVE}
while not raylib.WindowShouldClose
raylib.BeginDrawing
raylib.ClearBackground color.white
raylib.BeginMode3D cam
raylib.DrawGrid 10, 1
raylib.EndMode3D
screenPos = raylib.GetWorldToScreenEx([0,0,0], cam, 800, 600)
raylib.DrawCircle screenPos[0], screenPos[1], 8, color.green
raylib.EndDrawing
end while
raylib.CloseWindow