the return node is not updating after giving the value once

I’m having a problem with the branch

i am trying to make a outline overlay around the object, when the LineTrace hits the object, it should highlight

i made two separate for enabling and disabling overlay.

the TRUE side is connected to overlay, when the line trace hits it highlights

it says “hitting”, means everything is working.

The FALSE side is connected to end overlay, but when the line trace hits it, the function doesn’t call

It says “NotHitting” means the print screen it working, but the function is not being called.

new to unreal😅, thanks for the help

The targets are the hit actor right? Right click on the exposed Hit Actor pin of your line trace node and promote it to a variable. Set that variable to the hit actor only after the True pin of your Branch node, and use our new variable as the target when you wanna access it after the False pin.

Hope this helps :innocent:

its working now thanks,

but how it works, i don’t understand :sweat_smile:

thankyou for your help

You were trying to get the hit actor when the line trace wasn’t even hitting anything :upside_down_face:

Even if it was hitting something, it wasn’t the actor you were expecting.

This way, we’re saving the last hit actor :grin: (when your conditions are met)

1 Like

oh, now get it, thankyou very much

1 Like