Download

"3D" Crosshair?

Hello,
I could not find real info on this except basic tutorials on crosshairs so I figured I’d just ask.

For a turnbased tactical project I am trying to figure out how to implement a crosshair that rotates depending on the position of the “aiming” pawn and the position in 3D space the mouse is pointed at.
It should basically slide along meshes and stick to them file facing the player pawn or more specifically the weapon.

A very similar example would be the men of war assault squad manual aim crosshair.
EDIT: https://youtu.be/Gn_Q5wmxsNg?t=18
Something like this but without the red crosshair.

What would be the best way to approach this?

I thought about using a mesh with child meshes to make it dynamic depending on range to target and just rotate/normalize it according to the data of a line trace/hit result.
Does that sound efficient?

If there are better solutions I would highly appreciate input from you guys.
Can it be done via UMG or something?

I am still an ue4 newbie, basically a hobbyist so my theoretical idea might be horrible :wink:

I done similar thing to what you try. I made 3d frame box to mark location like it was done in old xcom game (that real one x-com from 1990s).

I made it trough special blueprint that i drop in level. It hooked to player controller dispatcher that told where 3d cursor is.
It worked quite well, but there is one problem with 3d. It is antialiasing, when cursor was close to camera all those thin lines of 3dbox were nice, but further they started to be antialiased. So i needed to make some function that compensated for distance, which was not that hard, i just did it with LOD (level of detail) and for further from camera i turned off transparency for frame lines.

It can be also done with umg, but umg renders flat images only. You could try umg widget in 3d space also.