Basically they use the Camera’s Location, added to a Trace Forward Offset of 120 and multiply it by the Camera’s Forward Vector to determine the start. They use the Camera’s Location added to a Interaction Distance of 250 and multiply it by the Camera’s Forward Vector to determine the end.
The issue is that if the camera boom (spring arm) shortens due to collision, the start point of the trace, which is based on the camera’s position, will move forward. This results in the trace starting further in front of the player and extending its endpoint further away, causing issues with interaction distances.
I’m attempting to modify the trace setup to ensure that the trace length remains consistent, even when the spring arm adjusts but I just can’t figure it out.
I did that successfully with the start position (using the head socket of the character) but I wasn’t entirely sure how I could accomplish that with the end point, being as I need the end of the trace to be where the camera is looking.
Anyway you could explain that in Blueprint or show an example? I’m not really sure what you mean by getting the direction and length and adding it to the actor. Do you mean like just tacking a Vector + Vector to the end of the Trace the way it currently is and adding it to the Actor? If not I still thank you, it gives me a direction to go in!
Took me about a week to wrap my head around this but I solved it with your advice of using the direction and length from the camera and adding it to the actor.
Take a look at the blueprint if you’re interested in how I solved it.