- Home /
Particle size changes when I build on a device
Hi guys,
I have a simple particle which uses a particle animation sheet. The particle itself is a simple square having a glitter effect over different frames. It has a fixed starting size which doesn't get changed anywhere.
The only thing that I do with this particle programmatically is I change its position on each instance it's supposed to be played and I change its render queue because the game is a board game and it's mostly made using NGUI (with which there was some rendering conflict when using default render queue).
This square particle is supposed to be the same size as my prefab which is a squareshaped slot, so I set the particle size accordingly. When I play the game in the engine, everything works as it supposed to, the particle is the correct size. When I build the game on iOS device however the particle turns out bigger than my slot.
I'd say I tried fixing it myself but I don't even know where to start since I can't imagine what can be causing this problem. The only thing I tried so far was to put the particle in my hierarchy inside the NGUI's UIRoo but that didn't help...
Maybe this is because the AnimationSheet of that particle is not part of NGUI's atlas and that screws with its size? Although, if that's the case, I still don't know what to do with it. The AnimationSheet's settings are: - Texture Type: Sprite (2D \ uGUI) - Sprite Mode: Single - Pixels to Units: 100 - Pivot: Center
and compression is Default, 1024, compressed.
Any ideas how to solve this problem?
Thanks
Is it being rendered by an orthographic or perspective camera? Objects in a perspective camera are scaled based on their distance from the camera. If you want your particles to maintain their size, render them with an orthographic camera.
You can do this by putting your particle system object on it's own layer, then set the orthographic camera's culling mask to include that layer (and the perspective camera's culling mask to ignore that layer)
I have only one camera (NGUI's) which is orthographic and it's culling mask is set to "everything". Also, the particle's Z position is 0, as well as the rest of the widgets
Answer by Bigproblem01 · Oct 27, 2014 at 11:12 AM
what happens here is that particle size doesn't seem to take into account the screen changes. Even if I change the aspect ratio in the engine (from iPad tall to iPhone tall for example) the particle size will be off...
anyone knows what to do with this?
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Build/apk size doesn't change 0 Answers
WebGL build size does not change after reducing textures size 0 Answers
iOS Xcode Archive size is extreme 0 Answers
Suddenly File Headers size ballooned 0 Answers