lundi 4 janvier 2016

Targeting Hud :reticle, floating name

Something important is to have a targeting system, and have a reticle around ennemies.

It is quite easy in ue4, because you have a function to transform 3D position to screen position.

First step, import your reticle, or crosshair as a texture into your content browser.

I suppose you've created your own HUD blueprint, and load it as default to your map.

Open your HUD blueprint.

You will react at receive draw HUD event.

I've created a pawn BP, for my ennemies, with a static mesh inside. Nothing more is needed for this paper.

First step,  I will loop through all actors with the class myEnnemyPawnBP and for the remaining, I think a picture is enough to understand.
I put the reticle around the ennemy (so the minus 35 because my reticle make 70*70 pixels), and I put its name above the reticle in red.






Aucun commentaire:

Enregistrer un commentaire