- Home /
Particles not Rendering on Separate Camera
I have a multi camera setup where one camera will render the scene and a separate camera will render a particle emitter attached to the player. I have it set up this way so I can have the particles stop when they hit a certain Y height on the screen (they are emulating bubbles and I want them to stop when they hit the top of the water, so I have a depth mask that will mask out the particles if they go above the water, but obviously it should only mask the bubbles).
I am running into an issue where the particles will not render in the game view, even though when I pause the game and look at the camera preview they are rendered in the right position by the correct camera. I made sure that the culling mask for the particle camera was set to the layer the particles are in and the depth of the particle camera is in front of (higher than) the scene camera. If I set the layer of the particle emitter to the same layer as the player then they render correctly (except for the part I want to mask out). Has anyone experienced issues with particles not rendering on cameras other than the objects they're parented to?
Answer by Cerbion_ · Jul 12, 2013 at 07:02 PM
Have you tried setting the "Clipping Planes" value of the camera from:
Near: 0.3 to Near: 0
Just an idea, let me know if it helps you!
The Near setting on my camera is at -2, and it definitely looks like the particles are within the bounding box that shows when I select the camera. Thanks for the suggestion though!
Also for what it's worth I'm using an orthographic camera.
Hmm what about the Flags? Have you tried setting the 'Clear flags' option to 'don't Clear'
Because I remember that I used to know the right solution of this problem, but I just can't recall what it exactly was :I
'Depth Only' and 'Don't Clear' have the same result (it only renders in camera preview).
Answer by PHARTGAMES · Aug 22, 2013 at 12:50 AM
I have a similar problem, it appears to be a unity editor bug.
If you change the clear flags or the projection type on your camera while playing in editor you will get particles.
The particles appear correctly in an iOS standalone build without any workarounds.
Your answer
Follow this Question
Related Questions
How to use 2 Cameras in FPS 2 Answers
have a camera from a different scene? 1 Answer
Run a simultaneous "viewer" build. 0 Answers
Shaders: How to ztest against specific layers? 1 Answer
Difference between OnWillRenderObject and OnRenderObject 1 Answer