I’m doing an android APP, and I came across a button that swap the android device camera back and forth :
- when the device use its back camera( CAMERA_BACK,CAMERA_DEFAULT ), the particle system works as intended.
when it change to front camera( CAMERA_FRONT ), the UI flipped horizontally so I have to manually flip it back… AND the particle system went all wrong , it turn itself upside-down and the position is all messed up. I tried to manually flip particle system as I did to UI but it went worse, the result is totally unpredictable. I believe it not only flips but also rotates. so…
PLZ OTZ~~ **
It’s a lesson for me as well.
The unity camera which renders what the camera in reality captures serve as the base camera (lowest depth) without rendering other scene objects, otherwise things will rotate unexpectedly. Then create another camera with “depth only” clear flag and higher depth value for rendering the rest of scene objects.
Or you use “Screen Space - Camera”
mode in UI canvas and add a separate
UI camera which only renders UI layer
(and remember to remove “UI” layer
from your AR camera), then change the
layer of all firework objects to “UI”,
effectively making all the firework
particle systems part of the UI
I’m not sure if I already did this but I’ll do this now. thanks for your patient.