Line Trace based on camera forward vector shifting/inaccurate when character changes direction.

Was having this issue a long time ago and ran into it again and wasn’t able to word my question in a way that found me an answer.

I have/want a line trace originating from my capsule location towards where the camera is looking. But whenever the character changes direction on movement input, the camera forward vector seems to shift for a second before returning to where the camera is actually looking, causing it to be inaccurate on turning.

Camera Direction Line Trace

Camera Direction Line Trace when moving

camera forward vector print

1 Like

It helps if you compute the trace from one place, you’re using two.

So, just camera would be fine, but I see you want it from the player.

I’m not sure without checking if the TPC capsule faces the direction or transit or not. You could try from the capsule, or from the actor, or the character mesh etc.

EDIT: I just checked, the capsule rotates with the player, so you can trace from there :slight_smile: