Hide multiple actors

Hi. I have a level with multiple blueprints that I would like to hide when the user hits a certain button on the motion controller. They are basically product information hot-spots that activate when the user points at them, but I would like the ability to toggle their visibility if the user wants a less cluttered view of the product. I thought it might be good to put this on the level blueprint but I cannot seem to get it working. Appreciate ANY help!

Get All nodes are actually handy for this type of thing:

294003-annotation-2019-12-15-142916.png

Tags can be a very powerful filtering option as objects and components can have multiple overlapping tags. And you can also take if further:

The above hides static meshes with a specific tag for the actors of a specific class. So you can hide / show only certain components of actors in case you want other elements remain unaffected.

You can assign tags in the class settings:

294005-annotation-2019-12-15-144358.png


If the script you presented sits in the Level Blueprint then you’re asking the engine to treat the entire level as if it was a winglet actor - that is not true, and the cast simply fails.

1 Like

Thanks Everynone. Where would this script live? Should I create a new BP and just drop it into the level, or would it go in the level BP?

Thank you, exactly what I needed! I made a new BP called HideCallouts, tagged all the callouts and dropped the BP right into the level. Worked like a charm. Thanks!!

This can be placed anywhere, actually. Ideally in the blueprint that handles Input - Player Controller or Pawn. If you have all other inputs in the Level Blueprint that’d fine, too I guess.

I’d avoid adding this to an actor in the LB if possible; input consumption and priority makes it confusing and harder to debug when things go wrong.

Glad it worked.

Just do be aware of the input consumption issues - LB actors get priority over the Player Controller - so the same button that hides the winglets will now not work anywhere else (unless you disable consumption).

As mentioned above, I’d normally keep something like this in the player controller / pawn - where all other inputs are processed, like moving, turning and so on. It is a user evoked action after all.

Thanks again. I put this script in the motion controller and it works beautifully. Appreciate your wisdom so much!