i am working on a game and really badly want a minimap included, instead of just doing a top view camera like you see a lot on youtube i am trying to do it different.
i made a map layout in photoshop and applied that to a flat cube, i made a second character which is just a cube with a arrow like picture on it to represent the player and have a top view of that so that it is still my own design and is drawn instead of just a top view of the game. i am able to see the second ( minimap ) character on the minimap but when i move it just stands there, i tried with applying the same movement controls to it so when you press forward both the main character and the minimap cube would move forward with the same speed etc. but i couldn’t get it working, i also tried using ai follow mechanics so when you move the minimap character will follow you and that way make its way on the mini map but that wouldn’t work either. does anyone know how to make a second character follow your character but then in a different place? i put the minimap level underneath my normal level so de X and Y coördinates are still the same.
I would personally set the arrow actor’s position (except for Z) and orientation to be the same as the character’s; this way, you could also choose the refresh rate of your map by calling the update every x fractions of a second.
sounds good, but how am i supposed to do that in blueprint? ( sorry, i’m new )
Here’s an example blueprint, this should work if you simply replace Z = 0.0 with your map’s altitude, and plug the SetActorLocationAndRotation function in either your cube/arrow’s Tick function, or an event to be called when you want to update the map.
okay, and am i supposed to place that in the blueprint of the minimap character, in the level blueprint or in the main player blueprint? and the Character in the first piece of your blueprint is that meant to be my main character or my minimap character?
This blueprint would be the minimap character’s (so you would place that in its event graph), and the Character reference would be the main character.
If you need more details, I’ll try and get a simple example running tomorrow.
i recreated your blueprint image in the minimap character like you said, but when i try to reference the main character it isn’t in the list of possible blueprintparts, so i selected my main character, went to the level blueprint made a reference there, and just copied and pasted it in the minimap character’s blueprint but then it says unknown and it also won’t connect to the rest of the blueprint. do you know what is going wrong and how to fix it? btw, if you give me your email or something i can send you the project so you can look for yourself maybe.
I think you could create the minimap character in the main character’s Begin Play method; this way, you can easily pass a reference to your main character to the minimap character. Or you could do that from a class that manages the minimap, by calling a method which would populate the map (by getting a list of all characters, and creating a minimap character for each of those).
Feel free to send me a PM if you want to send me your project.