# TPS: Muzzle boom to collision tracked by crosshair

**URL:** <https://forums.unrealengine.com/t/tps-muzzle-boom-to-collision-tracked-by-crosshair/436617>\
**Category:** UI\
**Tags:** crosshair, tps, unreal-engine, Blueprint, question\
**Created:** [October 29, 2018, 7:10am UTC](https://forums.unrealengine.com/t/tps-muzzle-boom-to-collision-tracked-by-crosshair/436617 "2018-10-29T07:10:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![usurperquaid](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@usurperquaid](https://forums.unrealengine.com/u/usurperquaid)\
**Post date:** [October 29, 2018, 7:10am UTC](https://forums.unrealengine.com/t/tps-muzzle-boom-to-collision-tracked-by-crosshair/436617/1 "2018-10-29T07:10:32Z")

</div>

Is it possible to put a boom from the end of a barrel that extends to first collision (or set distance if not collision) and then have a crosshair move about the screen tracking it?

I am creating a TPS and I am wanting to also swap camera from left to right shoulder which I have figured out, but this causes issues with my crosshair and my above question is how I would like to go about resolving it, if possible.

Thanks!

---

<div class="post-metadata">

**Author:** ![PixelOmen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PixelOmen](https://forums.unrealengine.com/u/PixelOmen)\
**Post date:** [October 29, 2018, 9:39am UTC](https://forums.unrealengine.com/t/tps-muzzle-boom-to-collision-tracked-by-crosshair/436617/2 "2018-10-29T09:39:39Z")

</div>

Are you familiar with traces? If not, you might want to look them up. They are insanely useful and there are many kinds.

You can set up a trace that runs from the end of your gun component to X amount of distance away from it’s forward vector. When it hits something, it returns something called a hit struct. You can split this struct up into a many different things, one of them being the hit location of what it just hit (which will be a vector).

You can then plug this vector into a node called “Convert World Location to Screen Location” which will give you 2D coordinates for you to use in a UMG widget or HUD BP for your crosshairs.

---

<div class="post-metadata">

**Author:** ![usurperquaid](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@usurperquaid](https://forums.unrealengine.com/u/usurperquaid)\
**Post date:** [October 30, 2018, 1:31am UTC](https://forums.unrealengine.com/t/tps-muzzle-boom-to-collision-tracked-by-crosshair/436617/3 "2018-10-30T01:31:50Z")

</div>

Thanks! I was able to follow the idea and will look into the steps of that process!

---

<div class="post-metadata">

**Author:** ![PixelOmen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PixelOmen](https://forums.unrealengine.com/u/PixelOmen)\
**Post date:** [October 30, 2018, 3:22am UTC](https://forums.unrealengine.com/t/tps-muzzle-boom-to-collision-tracked-by-crosshair/436617/4 "2018-10-30T03:22:54Z")

</div>

No problem. Be sure to sure to mark my post as the answer if it answered your question. Otherwise, let me know if you have any other questions.
