Open 3rd person BP, viewport
Add
1.Spring arm (name as MiniMap SpringArm), (set arm length 450, rotate -90,on top of character)
2.SceneCaptureComponent 2D (child it under mina map spring arm)
Select the scenecapture component, texture target, choose Render Target
Name as MiniMapTextureRenderTarget, save the texture
R click on the Render tagert texture, create material
Name as M_MiniMap_TextureTarget
Open the material, change material domain to user interface
connect the RGB input
Create a widget called WB_MiniMap
Add canvas and image
in image, set the size as square and change image brush to MiniMap texture target
Go to 3rd person BP, event graph
Now the mini map works.
To let the map fixed (always face to 1 direction) on its rotaton axis,
and make the map as flat 2d (i.e. no depth)
Go to 3rd person BP, viewport
Mini map spring arm, disable all camera settings below:
in scene capture component
change project type to Orthographic, increase width value make the camera distance longer from the character (after change this project type, spring arm length no longer affect camera distance)
Add player indicator in map:
Go to 3rd person BP viewport
Add PaperStrip component, name as PlayerIndicator Strip
child it under character mesh
search default Arrow texture in content broswer, R click and create Sprite
Back to 3rd person viewport Spirte, change the source sprite,
relocate it on top of character while below the capture component
in Render → Advnace, tick owner no see (hide the arrow in scene, just show in map)
Optional:
The tutorial changes the arrow material to masked unlit sprited material (i don’t find it)
It overrides rendering (i.e. the arrow won’t disappear sometimes when the character moving due to rendering)