13.04.2012, 17:47
Trigonometry experts, how would I do that?
What I have:
- X and Y Position in the screen.
- Width x Height, Resolution of screen in pixels (to roughly calculate player's field of view)
What I want:
- X,Y,Z in 3D Space with a distance specified by myself.
The function should look like this:
Consider this function already made:
What I have:
- X and Y Position in the screen.
- Width x Height, Resolution of screen in pixels (to roughly calculate player's field of view)
What I want:
- X,Y,Z in 3D Space with a distance specified by myself.
The function should look like this:
pawn Код:
ScreenToWorld(Float:ScreenX, Float:ScreenY, Float:Distance, &Float:X, &Float:Y, &Float:Z)
pawn Код:
GetScreenResolution(playerid, &Float:Width, &Float:Height);