Download

Particle beam not turning back on after turning off

In VR I am using a particle beam to draw a line between the player’s hand and the location where they are pointing, where it intersects a floating 3D widget. I attach the particle system component to the FPSController on BeginPlay. The FPSController also has a WidgetInteraction component for detecting interaction with the floating menu. On EventTick I find the start and endpoints between the hand and the menu hit location, and set the particle beam begin/end to those points.

That all works fine. Then I added a switch where pressing a controller button would open and close the menu. It simply toggles Hidden in Game on the menu and the beam effect when I press the button.

That also works fine. The problem comes when I try to skip the start/end calculation when the menu is hidden. I added a test for Hidden in Game to the Event Tick. If the beam is hidden, it skips the start/end calculation. If the beam is visible, it performs the calculation.

Adding this check for hidden cause the beam never to appear at all. I used prints to make sure the branch action was correct - ie, it is setting the start/end when the menu is visible, and the points look correct. But the beam never shows up. I can’t figure out why that would be? How could simply checking for the beam’s visibility cause the beam to disappear?

I read online about how particle beams can be finicky and that I should set the bounds. I tried doing that, but it didn’t affect the problem.

Thanks for any ideas!

Actually - nevermind! It was the bounds issue after all…