How to change crosshair color when character is looking at object?

So… i’m creating a First Person Horror game and i’m trying to make the crosshair change the color (-White to Green-) when my character is looking at an object. I’m surprised there’s not a single tutorial about this on Youtube, this stuff is pretty important in first person games imo but anyway… If you guys have any screenshots of the blueprints already i would really appreciate if you would share it in the comments because i would understand much better, but any help is greatly appreciated of course.

1 Like

It’s a few smaller elements that you have to look for.

First, Line Trace. Here’s Mathew Wadstein tutorial on that: WTF Is? Line Trace By Channel Node in Unreal Engine 4 ( UE4 ) - YouTube

Second, setting up a widget with your own crosshair. Just look up widget tutorials, there are lost of them. (small tip: Make your crosshair in grayscale. Then you’ll be able to change its tint without changing the image itself).

Third, changing the tint. You check your needed parameters in line trace (whether it hits an enemy or not), and change the crosshair tint respectively.