Why do particles disappear after the camera moves?

Hi,
We are building game with 2 players and a single camera. The players each have a particles system attached that when enabled (bHiddenInGame = false) shows a beam. However for some reason, when the players move forward in the level (without shooting) the beam doesn’t come back when activating it again, it becomes visible again after they backtrack towards their spawn point though, BUT if the players activate it more often or simply keep it active while moving away, the beams stay visible. I’m assuming it’s not a bug, and just a case of culling or something we’re doing wrong (I’ve found related(?) questions, like this one Force GPU Particles to render? - FX - Epic Developer Community Forums).
However I haven’t managed to fix our problem by changing the bounds scale.

Oh yeah I think it definitely has to do with the change in camera position, since if one player stays behind, thus making the camera stay behind too, it works fine for the other player (for as far as we can keep him in the viewport).

I’ve recorded a simple video to hopefully make it a bit clearer.
http://webmup.com/nRR09/vid.webm

  1. Players are at spawn. Beams work correctly.
  2. Players move onwards, try shooting again, but no particles show
  3. They go back, particles work again.
  4. Players move forwards but shoot while doing so, and now the particles don’t break.

Hi Shrekleton -

How do you have the Particle System hooked up to your character and his gun? In your video, the cube on the front of you character what are you using that for is it a visualization of the particle system start point?

Let me know -

Eric Ketchum

Hi Eric,
Yes the particlesystem is a component on the character.
That cube is simply a cube we use as trigger used on in-game puzzle mechanics, but its location is passed the same values as the end point of the beam.

Thanks for replying

Hi Shrekleton -

Can you post a screenshot of the source and target modules of your beam particle?

Thanks

Eric Ketchum

Hi Eric,

Hope these help,




Thanks

Hey -

Try setting the Beam Source and Target in the Event Graph of the Player Character based on two points established in the Components instead of setting the instance parameters up themselves. You will want to pull a relative location from the two points to connect into the Set Beam Source Point and Set Beam Target Point.

See if that clears up your issue for you and let me know -

Eric Ketchum

I forgot to mention we also have this very basic particle emitter when the beams connect from opposite sides.:
http://107.161.22.27/paste/images/3.png
and this has the same problem (going invisible), so I don’t think the beam source/target are the problem. This ‘ball’ particlesystem’ s position is set simply with SetWorldLocation( FVector v ), and like the beams, works great at the beginning of a scene.
As extra information, we create all the beams and ball in C++ constructors.

PCIP.CreateDefaultSubobject<UParticleSystemComponent>( this, TEXT("BeamParticles") );

and here’ s something interesting:
http://107.161.22.27/paste/particles2.webm

  1. players move away from the start zone, so we introduce the bug
  2. activate beam, but we can’t see it.
  3. Eject from game, beam is still invisible
  4. Move the camera outwards in the editor, et voila: the particles appear again.

Hi -

This is starting to sound like a culling issue. Are you setting LODs for your particle systems in code?

Thanks

Eric Ketchum

Nope, haven’ t touched LOD settings at all.

Hi,

Sure, this is all we do with it.

http://pastebin.com/bJvH99qV

It’s from our CharacterController class.
Thanks

Hi -

Could you post your UParticleSystemComponent code?

Thank You

Eric Ketchum

Hey Shrekleton -

This is an interesting issue. This actual looks like it might be an issue of absolute versus relative positioning. I know you have it set up to use relative position, but I also noticed in your code you have coded the Beam’s direction Z coordinate at 0 which I would have also done, but I am wondering if this is causing your issue with an absolute value being substituted in a relative positioning setup? In which case, the effect you are experiencing with firing your beam and moving your character is actually a bug which forces the engine to take the relative positioning information over the absolute information.

Hopefully this will give you something to start with as we continue to look at the issue from this end -

Eric Ketchum

We managed to circumvent our issue by replacing the

particleBeam->SetHiddenInGame( true ) /particleBeam->SetHiddenInGame( false )

with simply giving the beam start and end locations to a hidden location under our scene, effectively hiding them without turning them off.

But their positions have to be updated every tick, even when hidden (underground).