Cast child actor component as Actor from parent

Hello guys.

Context

I’ve created a Character blueprint, I’ve added a child component to the camera of the player. This child component is a subclass of the LeapRiggedEchoHandActor , i’ve named it MainsLeapMotionBP; it manages events and add hands visualization.

96275-components.png

On a certain Leap motion event, a processing is done then a custom event is called from the character. This action use the function “LineTraceByChannel” to get the actor the character is looking at.

Problem
When the hands are in the middle of the screen, an actor of class ‘MainsLeapMotionBP’ is returned for the HitResult. I cannot succed to add this actor to the ‘ignore list’. All i’m able to get is a Child Actor.
I would like for this character, to ignore its own hands during the LineTrace. I’ve tried to add the Character into the IgnoreArray, but child actors arn’t ignored.

Event graph for my CharacterBP :

As the HitResult contains the Hand Actor (Display name during runtime : MainsLeapMotionBP_C ), i guess it’s possible to add this component into the Ignore List. Am i wrong ?
Is this a problem of registration ?

Thanks a lot for any ideas .

I’m not positive about this answer, but it may help…

You’re using a ChildActor component in your Character blueprint. The thing to know about ChildActor components is that they act as a container that your real blueprint instance will be placed inside of at runtime. So it’s actually the child of your ChildActor that I think you may need to add to your ignore list.

You can get a reference to the child of a ChildActor component by using the GetChildComponent node in your character blueprint, making sure it’s “Target” pin is connected to “MainsLeapMotionBP” and the “ChildIndex” is set to 0.

That’s exaclty what i was looking for. I’m now able to add MainsLeapMotion actor (component of my CharacterBP) into the ignore list.

Had to add ‘Get Owner’ node to retrieve the actor from the component.
Thanks a lot :slight_smile: