You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JoeStrout edited this page Apr 29, 2026
·
2 revisions
Get the world space position for a 2d camera screen space position
Parameters
Parameter
Default Value
Note
position
camera
Return value
Condition
Return Value
(always)
map
Notes
Example
cam= {offset:[400,300], target:[0,0], rotation:0, zoom:2}
// Convert center of screen to world coordinatesworldPos=raylib.GetScreenToWorld2D([400, 300], cam)
print"World pos: "+worldPos[0] +", "+worldPos[1]