Changing height of line trace from character

I have an AI that detects a player and moves towards them by using the Single Line Trace by Channel node to check if it sees a player. However, the trace line is very low on the bot - I want the bot to begin it’s trace from its head, or at least higher up on its body.

In this picture, the bot (black character) sends its line trace towards the player (blue character), but the line trace is much lower than I would like. Is it possible to change the location from which the bot sends its trace?

10901-low_trace.png

Thanks!

That picture gave me a good laugh. :slight_smile:

When you input the start and end location of your line trace, add a vector that offsets +Z to it and feed that into the start/end.

Thanks Zeusitiak, that was just what I was looking for - the trace line higher up and not quite as ridiculous anymore :slight_smile:

Another way would be to add a component to the BP, such as an arrow component, and have it positioned where you want to trace from, then just trace from the component.

Can you give an example in an image? I am trying to add an offset, but the just sets the Z axis on a set point instead of actually moving with the actor.