# Change HUD crosshair when targeted on object

**URL:** <https://forums.unrealengine.com/t/change-hud-crosshair-when-targeted-on-object/293634>\
**Category:** UI\
**Tags:** crosshair, hud-blueprint, target-point, hud, unreal-engine, question\
**Created:** [September 13, 2014, 9:30pm UTC](https://forums.unrealengine.com/t/change-hud-crosshair-when-targeted-on-object/293634 "2014-09-13T21:30:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![HoloX\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HoloX\_1](https://forums.unrealengine.com/u/HoloX_1)\
**Post date:** [September 13, 2014, 9:30pm UTC](https://forums.unrealengine.com/t/change-hud-crosshair-when-targeted-on-object/293634/1 "2014-09-13T21:30:04Z")

</div>

Hi,

I’ve made a crosshair HUD in the middle of my screen. It must change color when the player points the crosshair on a specific object. How should I set this up? I’m not sure how the event is called that need to be used.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Erasio](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Erasio](https://forums.unrealengine.com/u/Erasio)\
**Post date:** [September 13, 2014, 9:36pm UTC](https://forums.unrealengine.com/t/change-hud-crosshair-when-targeted-on-object/293634/2 "2014-09-13T21:36:32Z")

</div>

You need a traceroute (just search for trace). It will provide an “actor other”. You can check that one if it’s the actor you want and change it if it is.

---

<div class="post-metadata">

**Author:** ![chuklov](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@chuklov](https://forums.unrealengine.com/u/chuklov)\
**Post date:** [September 14, 2019, 11:23am UTC](https://forums.unrealengine.com/t/change-hud-crosshair-when-targeted-on-object/293634/3 "2019-09-14T11:23:14Z")

</div>

Posting my implementation of the crosshair colour change and shooting form the weapon to the enemy (NOT from the middle of the screen)

First line trace running every 0.1 seconds to measure the distance and find an enemy and written to variables, and the second one is used to shoot.

 ![287288-maincharbp.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/e/c/cec53dfa7957059586f2c539838dec9fdb93d817.jpeg)

 ![287290-weaponbp-1-3.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/9/7/897d59a0d7dda6b251d15915119a0115528ec6ed.jpeg)

 ![287301-weaponbp-2-3.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/4/b/64b6939e36c5233095a70647581c49f8a353b7a5.jpeg)

 ![287302-weaponbp-3-3.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/5/f/45fa10ce2b897e205c9f48dfff1d4cc2e482be9d.jpeg)

 ![287303-mainui-crosshair.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/6/f/56f256d0c6e518fe0344d0a7a8b7431c930252b3.jpeg)
