If you scroll to my answer here:
https://answers.unrealengine.com/questions/1042681/impossible-to-create-game.html
There’s an example demonstrating a very similar behaviour; the boxes pop up when the player looks at them and return to their normal state when they’re no longer being looked at.
Hope it helps.