I’ve followed this tutorial to create a HUD radar : UE4 Tips: Plug and Play Radar | Shooter Tutorial Unreal Engine 4 Radar - YouTube
It’s pretty simple to do, It works well.
And I would like to convert it to a widget so I could place it in my 3D environment.
does anyone have any idea of how to do it, or any existing example/tutorial of a widget radar?
I have implemented s vicinity radar and s map radar in widget. I use a in world actor to represent 0,0
This actor is placed in the map in the top left of the map at furthest direction a player can go.
For simplicity sake let’s say your map is 80,000 units in a square… You get your location on the map by finding your distance away from the in world object. You then need to conver it to a 0-1 so you can scale it to the widget easier.
So player location - actor location / max distance (80,000)
This might give you say 0.3x0.2
Then multiply that buy the widget max size say 512.
You’ll get pixel location in the 512 space.
In the widget you need to override the on draw to draw a slate where player is.
I suppose if I can find some time I can put togeather a tutorial but this should give you some theory to think about.