Hi, I’m having trouble getting the character’s position and transferring it to the minimap.
Details can be explained as follows: When I press a button, a minimap will open. The minimap is just a static image created in Photoshop. When the map is open, I want to see the character’s position on that minimap. You can refer to the image below.
Thank you very much for your assistance.
Depending if the image is for the whole map or if you have an array of images, one will be easier worse on performance and possibly other texture issues.
Essentially you have a mesh model or landscape and what you want to do is create a mapping of x and y to a u and v
So for simplicity say you know bottom left of your map is 0,0 in x and y then u and v will be 0,0.
Now say in the middle its 50, 100 x and y you want .5, .5 for u and v
So first start by converting the physical space and find out what your min and max are for x,y then use a lerp for your uv based on current position as you approach your max it will get closer to 1 which is closer to your max.
This will get you on your way for mapping the texture out, then you can use a range to deviate left and right so you have a map that fits on a plane and if you are doing based off the center of the map is always where the player is, then hey presto add a decal to the center of your model that represents and then that way it will always be in the middle whether they rotate there position or not
But likely your after a map you can pan then just look into blending a texture over the top or adding decal based of player position hope this helps or is what you’re after