Why are my trace Start and End not working?

I followed this tutorial on how to set up a trace in blueprints, which would make the object my player is looking at become a variable or whatever else.

Simple enough, but my only difference is that I’m calling this function from a very simple UMG button, so the variables for the player’s location aren’t local. I thought it would be easy enough to make a variable that points to the player blueprint, but the trace is completely dead. I’m using the First Person character from the template, so I’m referencing the First Person Camera component in this blueprint. The trace unfortunately starts at the origin of the world and travels down the X axis in a flat line, not thinking about where my character is a all.

Here are the blueprint and the debug line in the level.

Get Rotation XVector instead of Forward.

Thanks for your help, Jacky, but the result is 100% the same.

Hmm, what happens when you try this directly in your character BP?

Welp, it works perfectly fine when it’s just in the character blueprint. I originally tried this, but I never got the trace to run because my UI Widget refused to the function when it was in the character. I didn’t try testing it all alone in this BP. I love blueprints, but I always run into problems getting references to outside classes. Now that I know this works, I’ll just find a workaround. Thanks for your help!!

No problem. I havent fiddled with UMG yet so i couldnt think of it right away. It will work eventually once you fix the references it seems. :slight_smile:

Here is mine. Is into level blueprint.
Create a trace from eye height to eyeheight+100 forward!
alt text