How to change crosshair texture on mouseover object

Hi. I couldn’t find anything related to this topic (not on the surface, at least). I’m using the HUD from the FirstPersonExampleMap to draw a simple white dot in the middle of the screen.

I’m also using a simple trace line with a tick to outline objects using Master_BP.

How can I change the crosshair from HUD when hovering that object with my trace line?

Thanks. =)

Hey Rbacch,

You’re going to want to do the following:

  1. Create a boolean in your first person character’s class that keeps track of what you’re hitting
  2. Set that boolean to true/false depending on your line trace
  3. Cast to first person character in your HUD so that you can access the character’s newly created bool
  4. Make a branch to determine which crosshair to use

Ignore the warning in the line trace image. I left out a few things for sake of simplicity. You just need to see how the boolean is implemented

Hi Mookiez, thanks for the fast reply. =)
I got what you meant, pretty straightforward. But for some reason I can’t Set First Person Char after Cast to FirstPersonCharacter. Do I have to create a new variable in my FirstPersonCharacter BP? If so, which variable type?

Nevermid, got it working after promoting to variable. Thank you very much for the help. =)

Bingo! No problem

Im also looking a way to do this… could you put images of the final result or something? so i can try to learn (noob here…)