(Screen 2D) -> (3D Points with specified distance)
#1

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:
pawn Код:
ScreenToWorld(Float:ScreenX, Float:ScreenY, Float:Distance, &Float:X, &Float:Y, &Float:Z)
Consider this function already made:
pawn Код:
GetScreenResolution(playerid, &Float:Width, &Float:Height);
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)