So i have a Gun_Ship actor with a child turret on top called Gun_Ship_Turret_1. This game is 3D but everything in play is at 200 on the Z axis as it mimics a 2D game. Since the turret is up higher than 200 on the Z-axis it’s linetrace won’t hit some ships and targets and thus won’t shoot., so the linetrace actually happens lower than the turret, being at 200 Z.
The problem is the Gun_Ship parent actor of Gun_Ship_Turret_1, is being hit by this line trace obviously since it’s below the Gun_Ship_Turret1. How do I make the LineTrace ignore it’s parent?
I tried adding the parent actor, Gun_Ship to an array, but the array won’t plug into the “Actors to Ignore”, and when I create an Array off the Line trace, i can’t add the Gun_Ship actor to it.
You’re pretty close. The reason plugging the output of Get Attach Parent into the “Actors to Ignore” array is not working is because this function returns the SceneComponent the actor is attached to, not the parent actor.
To get the parent actor you need to call Get Attach Parent Actor which returns the parent actor and will plugin into the “Actors to Ignore List” and get ignored by the line trace succesfully.
Actors to ignore is expecting arrays of actor references. Your variable “Dont scan” is most likely not an array of actors but array of components since I can see that you are adding a scene component to it instead of an actor. If you hover over the “get attach parent” node it says “get the scene component we are attached to”. Sometimes it is as easy as just reading the hints unreal is giving you. Try to use “Get attach parent actor” instead and then you should be able to add it to the actors to ignore array.