1

Topic: Help needed.. MapPos to ScreenPos

Hello, it's me... My POI system is working, but I'd like to im plement a feature, that allows the user to move the POIs.
For this, I have to convert a xy position on the map, to a xy postion on my screen. How can I do so?
Thanks!

2

Re: Help needed.. MapPos to ScreenPos

I can only provide the theory of it, maybe you can figure out the code yourself: (Pls don't laugh me, it's painty Paint xD)
>>picture

3

Re: Help needed.. MapPos to ScreenPos

In src/game/client/render.cpp, there is a function MapscreenToWorld that does the opposite of what you want. You just have to look how it's implemented and reverse the code.

4

Re: Help needed.. MapPos to ScreenPos

Thanks! Works like a charm now!