Actor begin overlap - Other actor?

Hi.

I am a bit confused about the other actor pin on the event actor begin overlap.
You cannot cast from it, yet you can set a variable to hold that reference and then cast from it.

Which to me is the exact same thing except the one requires more nodes.
Why?

Hello,
You may had context sensitive unchecked. If not, you may have an issue with your engine or your project.

Hi Fen.
I can see the option to cast to that actor. The problem is the cast fails.
Only when i set a variable with the object actor does the cast succeed.

That’s weird. Did you try to directly cast on overlap event exec output? If your cast fails maybe another event (even another overlap) prevents overlap to markerbp to be detected. May trying a get overlapping actors to print string to debug could show if this is the reason. But that’s weird it works with variable.

Edit : For now, i have no more idea to help you sadly. In hope someone else have one.

Another idea : print other actor output to know what is in, because maybe it is empty but even empty, variable is considered and cast works as this is the same type of variable.

Hi.

I think its a bug of sorts.
I did the print and it shows its the correct actor so it should cast. Perhaps just a tiny bug.
Not too big of an issue cause i just set the variable and cast from it.

I cast stuff in begin overlap all the time in my project just fine. A few things about your BP. We can’t see what’s going on int that =ToMarkerBP macro, but it sounds important to the issue at hand. We can’t see what type your “At Marker Ref” variable is defined as, which is also very important to debugging this. You’re potentially assigning the “Other Actor” pin to it without knowing what the type is? I’m guessing that’s what your macro is for. Why do you have a delay node in there at all? It can only make your code slower, no possible way it’s helping the situation. I see you have a wire coming off the “Cast Failed” pin, but I can’t see what it’s linked to. It probably shouldn’t be connected at all.

In my project the player’s vehicle can hit a whole bunch of other stuff, so I basically built up a big switch statement to figure out what it was. And depending on how your components are all laid out, it is entirely possible to get overlap events from hitting yourself! I have checks later on not shown here to handle that case.

Hi.

The makro is simple.

It converts the other actor to string. Get the substring. Then is string equal to"markerbp"
I included it so that no other object is placed in the variable. Only the markerbp actors must be success.

The cast failed wire was connected to a print node just printing on the screen that it failed for debug purposes.
The reason for the delay was another issue where the events would fire so rapidly that it would try to cast to the object before the variable knew what was happening. So the cast would fail. After i added a short delay the cast no longer failed.

The at marker variable type is object.

I have no idea why i couldnt cast from the other actor pin like you clearly can do it. Im using 4.6.1

I assumed it should be as simple as you showed in your screenshot.
My original design was exactly the