# Linetrace Length?

**URL:** <https://forums.unrealengine.com/t/linetrace-length/474360>\
**Category:** Multiplayer & Networking\
**Tags:** line-trace, linetrace, shooter-game, multiplayer-shooter, unreal-engine, question\
**Created:** [November 12, 2020, 1:17pm UTC](https://forums.unrealengine.com/t/linetrace-length/474360 "2020-11-12T13:17:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_3ad9ae12](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_3ad9ae12](https://forums.unrealengine.com/u/anonymous_user_3ad9ae12)\
**Post date:** [November 12, 2020, 1:17pm UTC](https://forums.unrealengine.com/t/linetrace-length/474360/1 "2020-11-12T13:17:42Z")

</div>

I’m trying to make a Third Person Shooter, and I want to make the crosshair larger or smaller depending on how far the linetrace from my gun goes (like in PUBG). is there a way to get the distance the linetrace travels before it hits something?

---

<div class="post-metadata">

**Author:** ![LogierJan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/logierjan/32/88718_2.png) [@LogierJan](https://forums.unrealengine.com/u/LogierJan)\
**Post date:** [November 12, 2020, 3:04pm UTC](https://forums.unrealengine.com/t/linetrace-length/474360/2 "2020-11-12T15:04:42Z")

</div>

If you want to know how fare the object is that you will hit you’ll have to do a linetrace for that too, and get the distance. (this is the distance between the trace start and the point of impact)

 ![321794-linetracedistance.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/c/6/3c67af5093c842aa5613eafcc03a99491a0f0870.png)
