[Solved] The right algorithm for making a mini-map like thing

Hello everyone. I am working on a game and I want to make a mini-map-like system. Something like this:
image
As the player moves forward, that arrow moves forward too, showing our progress. Does anyone know how to make this?

I don’t know if what you need is like the tutorial below but hope will help anyway

Thanks for the tutorial :grinning: but it doesn’t help.:worried:

I think you should divide the lenght of your level (in pixels) by the width of the “minimap”
(like if your level is 1800 pixels wide and the width of the screen is 700 then divide 1800/700) and the result is 2.5.
Then make a variable called “CharacterPos” which will be always the same as the character’s x position. Now, divide that number by the result of the previous division (like 600/2.5) and set the arrow X position to that number. BTW be sure to put the “minimap” in another layer.

2 Likes

Is this the formula/algorithm?
Looks like its gonna work
I will try it and tell the results

Those are the events. And they work fine for me:



Oh yeah! That’s what I wanted (I think)

1 Like

It worked! Thanks, @Nappey, this means a lot to me :grinning:.

1 Like