Download

Disable a child actor from construction script.

Hey guys,

Thought this would be easy, but I’ve been at it all afternoon.

I have a child BP component that I want to activate/deactivate (visibility and collision) with a public variable from my construction script.

I can’t figure it out. I’ve tried Set Active - no effect. I can toggle the visibility (not without issue though, I seem to need to toggle it a few times to make it ‘reappear’), but can’t seem to set collision to turn it off.

I feel I’ve tried it all: toggling actor collision, toggling mesh component collision, toggling set active. Casting to the child, applying visibility directing to the actor component. Nothing has worked.

Is there an obvious way of doing this?

Here’s my most recent attempt. Visibility will toggle sometimes with this setup (Like it said, for some reason I need to turn it off and on a few times before it reappears - which isn’t ideal). But the mesh is still being ‘hit’ by my trace (which I need it not do).

Any ideas?