Jump to content

[Question] How can I calculate pixels from world position?


Kazafka

Recommended Posts

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
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...