Hello to everyone
I’m using the AttachActorToComponent node to attach spawned actor to the pawn’s component.
I’m trying to raycast (LineTraceForObjects) and check does Out Hit Hit Actor is part of the player’s pawn or not
But I can’t understand how does it work, I tried several things and got the same result "access to none trying to read… "
Raycast works well, I can get Get Display Name of the actor
You may need to show us how you do it.
How to get parent actor of attached actor?
It sounds like this should be enough:
Thanks, it works if I raycast to the attached actor, but got the same errors when I tried to raycast other pawns, probably I need to do IsValid check
I did a pretty simple logic
In Trace Object Types Local array I have pawn and this attached actor (shield in my case)
What I meant is that that single node would give you:
get parent actor of attached actor
No trace needed. On the other hand I might be misunderstanding what’s needed. And on the third hand, you flagged it solved. Is it?
Well, my goal is to check where a gun on my spaceship is aiming at, and then if it’s aiming to the ship itself - disable shooting.
So, I’m trying to raycast in the direction of the gun to determine what the gun is aiming at
Providing this is the gun, the script is set up correctly.
Where does the attaching comes into play?
You may want to tick Ignore Self as the actor can trace against itself, unless that’s what you want.