Making sense of "get_user_origin" coordinates
Hey
Is there any way of making sense of the get_user_origin() "current position" coordinates? For example here are some coordinates i receive for player over a 10 second period: Quote:
Also, is there any way of calculating the upper left coordinate (0,0) and the lower right coordinate (n-1, n-1) so i can calculate how large the map is? I would like to plot the coordinates to a overview image of a map. Thanks |
Re: Making sense of "get_user_origin" coordinates
A map is a 3d referential, the origin is 0, 0, 0, and depending of the orientation of axis, a place can take negative or positive numbers.
May be a picture would help you. ( forget the left picture ;) ) http://i.msdn.microsoft.com/dynimg/IC208183.png |
Re: Making sense of "get_user_origin" coordinates
Thanks!
That was what i was guessing. Could you think of a way for me to make sense of the coordinates? So i can plot the coordinates on a overview map. Maybe a way I can get the minimum and the maximum x, y and z coordinates of a given map. |
Re: Making sense of "get_user_origin" coordinates
It's something like this:
distance in cs / 8 * ZOOM = distance in pixels on overview <mapname>.bmp center point of an overview <mapname>.bmp corresponds to ORIGIN in cs. You can find ZOOM and ORIGIN in cstrike/overviews/<mapname>.txt |
Re: Making sense of "get_user_origin" coordinates
I was thinking that file had something to do with it.
But I don't quite get it yet. For example de_dust (1024px x 768px): de_dust.txt: * Zoom: 1.2 * Origin: x=101, y=1071, z=-192 de_dust.bmp: * Center point: x=512, y=384 Aprox. CT spawn coordinate (in CS): * x=-264, y=-1518, z=100 Could someone maybe show me how to calculate the coordinate according to the overview picture? Thanks |
Re: Making sense of "get_user_origin" coordinates
Quote:
y axis: (1071 - (-1518)) / 8 * 1.2 = 388.35 Center point: Y=512, X=384 512 + 388 = 900 384 + 55 = 439 |
Re: Making sense of "get_user_origin" coordinates
Ah, I mixed up the origin X and Y coordinations.
Thank you for your help! |
| All times are GMT -4. The time now is 14:25. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.