There’s a lot of confusion about casting, mostly thanks to youtube.
Here’s how it goes:
-
A direct reference is just that. You have a variable of type ‘blueprint A’ in ‘blueprint B’ and use it to talk to the other blueprint.
-
Casting is ACTUALLY used to find out if the actor you have just encountered IS of the type you suspect it is. Nothing to do with communication. Notice the overlap node
It says ‘other ACTOR’, it doesn’t say, ‘other player’. The overlapping actor could be literally anything ( the sky, the ground, a missile etc ), so we cast to find out ‘hey, is this my player?’
And the cast will say, yes or no, and kindly give us a reference is the answer is yes
While I’m on the subject, this is what’s great about interfaces. Interfaces get called on an ACTOR, not any particular kind of actor. So you can say
( Interact is blueprint interface I made ) and the ACTOR can do anything it wants to with the interact call. No assumptions about what kind of actor it is. No assumptions about what’s it’s going to do when you say ‘interact’. It could flash yellow, or fly up in the air, or open ( if it’s a door )