Kazafka Posted February 2, 2020 Share Posted February 2, 2020 Basically, how can I calculate some pixels from world position, in MTA? Link to comment
Moderators Patrick Posted February 2, 2020 Moderators Share Posted February 2, 2020 https://wiki.multitheftauto.com/wiki/GetScreenFromWorldPosition Link to comment
Kazafka Posted February 2, 2020 Author Share Posted February 2, 2020 4 minutes ago, stPatrick said: https://wiki.multitheftauto.com/wiki/GetScreenFromWorldPosition I meant, to calculate pixels from world positions for 2D images, ex.: dxDrawImage() *as in my prev post (function) Link to comment
Moderators Patrick Posted February 2, 2020 Moderators Share Posted February 2, 2020 4 minutes ago, VaporZ said: I meant, to calculate pixels from world positions for 2D images, ex.: dxDrawImage() *as in my prev post (function) I do not understand you. Link to comment
Kazafka Posted February 2, 2020 Author Share Posted February 2, 2020 Just now, stPatrick said: I do not understand you. Well, imagine, that you want to create a minimap, not a radar with blips, etc., but only minimap, right? And, you want to zoom it, or show only the part of it, where is player standing right now, on real world. So, you need, to calculate pixels from world position, right? Link to comment
Moderators Patrick Posted February 2, 2020 Moderators Share Posted February 2, 2020 5 minutes ago, VaporZ said: Well, imagine, that you want to create a minimap, not a radar with blips, etc., but only minimap, right? And, you want to zoom it, or show only the part of it, where is player standing right now, on real world. So, you need, to calculate pixels from world position, right? It's a bit complicated to explain and prepare. I recommend you download one from the community and see how it works. But. The center of the background map image is the 0,0,0 position in the game. You need to calculate 1m in game, how much pixels on the screen. And move in the right direction, from the middle. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now