18.03.2007, 18:10
Quote:
Originally Posted by [N20
Xtreme ]
Thanks guys for the comments ![]() The San Andreas map is about 5920 units long, so you would set up the porportion: For the X Coordinate: XCoord Scaled Coord (Out) _______ = ____________________ 5920 Map's Image Length And after that, for the X coord you would add half of the map's length to it. For the Y Coordinate: (-1*YCoord) Scaled Coord (Out) ____________ = ____________________ 5920 Map's Image Length So that it is mirrored. And after that, once again, you would add half the map's length to it. Hope that helped ![]() |
![confused](images/smilies/confused.gif)
I tried what you said with 2 completely different coords. And i got these:
Code:
x1: 767.99971846581 y1: 767.99976180499 x2: 768.00012037307 y2: 767.99977599659
These are my functions:
Code:
<? function XCoord($coord) { $conv = $coord/5920; $conv = $conv/1536; // 1536 is the width of the image echo $conv+(1536/2)."</br>"; } function YCoord($coord) { $conv = $coord/5920; $conv = $conv/1536; // 1536 is also the height of the image echo $conv+(1536/2)."</br>"; } ?>