hey guys, im kinda new to unreal so still figuring many thing
following a tutorial for a pickup system, i got a line trace that hits the item and checks if it implements an interface, then it should call Interact on it. inside the item theres just a print string that says “Hello”.
The trace work fine, hits the right object, but the “Hello” text never shows up no matter what i do. no clue why.
I tested it myself and it seems to be working correctly. It’s possible that a setup step was missed somewhere along the way.
Just out of curiosity, could you share the tutorial you’re following? It might help identify what’s causing the issue.
Also, I recommend adding a Branch right after the Line Trace to verify whether the trace hit an object before processing the result. This way, you avoid processing an empty Hit Result when nothing is detected or hit.
If its not providing the print string node, are you watching it go through the notions in the bp editor? for example, Assuming you have at least 2 screens hopefully, you can pull the BP editor on the one side and ALT TAB out of UE5 or 4 and go into the BP editor and click the node (No debug Object selected) to watch it as it goes along the trail. Once you trigger the event it should go through everything, of course you would want to also use a Key trigger/button trigger to activate it actively to debug.
Interesting, its not showing up for some reason, I will assume you have not placed it in the level whatever the BP is yet? Because it will only track if its in the level and able to activate. If its in the level then thats really confusing. The BP itself has to be in the level for it to be ref
The easiest way to follow the chain of execution would be placing a Breakpoint.
Inside your line trace function select the first node (LineTrace) and hit F9 to create a breakpoint, a new icon will appear on the node. Start the game, wait for it to trigger, it will pause the execution and take you blueprint graph. Use the arrows on the menu bar (where play button normally is) to move one execution over to until it stops. That’s where your code fails.
That would mean that actor hit does not implement this interface.
I would pull of the Hit actor and get display name to verify you hit desired target. It should return class name instance eg. BP_Something_0. If this is the right target double check if you added the interface.
I think I found the issue. You’re multiplying the Forward Vector by 80, but it should be 800. With a value of 80, the Line Trace is too short and won’t reach the objects correctly. Try increasing it to something higher, like 800, and it should work.
I also recommend setting the Draw Debug Type to Persistent so you can properly test and visualize the trace, making it easier to verify that it’s reaching the expected location. That can be very helpful for troubleshooting issues like this.
Set a breakpoint on the LineTrace node with F9, run the game, and step through the execution using the arrow controls. This will show exactly where the Blueprint execution stops or fails.