# Limiting a trace's direction?

**URL:** <https://forums.unrealengine.com/t/limiting-a-traces-direction/235169>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [June 13, 2021, 7:13am UTC](https://forums.unrealengine.com/t/limiting-a-traces-direction/235169 "2021-06-13T07:13:51Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [July 9, 2021, 9:45am UTC](https://forums.unrealengine.com/t/limiting-a-traces-direction/235169/18 "2021-07-09T09:45:35Z")

</div>

Is there a reason we’re box tracing on Tick for ? I understand that you may need it for something else but it seems redundant here. Do tell, perhaps I’m missing the point.

Why not approach it from the event-based side of things, as suggested above. Besides that, there’s a couple of unknowns in your script:

- are we sure velocity can be used (does the owner have a movement component - probably, but we can’t tell from the pic)
- why not use Trace Start / End for direction since we have it and want to rely on it (you understand what it’s supposed to do here, surely!)
- the up vector should be the enemy’s up vector, not yours - may be irrelevant but we have no clue how things work / rotate in your game. If you look at the snippet I posted, you’ll notice it’s from the enemy’s point of view.

Consider the following:

- in the player

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/3X/7/3/73a5fb462f7040bd99bd593f499da0f4540bce54.jpeg)

- and results in:

- and the debug, if you’re into that kind of thing:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/3X/0/4/04bad09569affbf631ebaa3b69ac2c33c0df7dcb.png)

Apologies if I missed something critical discussed earlier on.

---

_[View the full topic](https://forums.unrealengine.com/t/limiting-a-traces-direction/235169)._
