- Home /
image moved is leaving a trail
hi everyone i have a menu on the iphone where the menu can be moved left or right and it works fine the only problem is when it is built i am seeing a trail left behind and does not go away until the ui is hidden any ideas on how to fix this
ive tried a few things, but builds take so long its taking ages to guess
Answer by Kryptos · Aug 06, 2012 at 02:32 PM
Like @holymcroly, I think that this might be related to the camera clear flags that is used to render the GUI.
Don't clear and depth only can cause this kind of thing if no other camera are used in the scene. If it is the case, consider using a background color to clear the camera.
ahh ok i will try adding another camera... i just did a test with out any background image and it is a lot worse... i hope its because there is only one camera, as im only testing my menu the actual game camera attached to the player isnt in the game. so i will put one in and post back in about 5 $$anonymous$$utes.
im using ios 6 so sometimes i get api errors and stuf in xcode so might take a bit longer, nothing serious its just the authorising part which sometimes fail
oh my god thank you so much, up untill now this is the only problem which really had me stumped, i never had this on my main menu as the main menu is in a room wich pans to different parts. but this really had me.
i will have to write this down as i probably forgot soon...
i dont suppose you could explain why it does this, or a link to a website which explains, i like to know why i shouldnt do something rather than just knowing not to do it.
if not either way it works now and would of caused me hours to figure it out on my own
Answer by Akill · Aug 06, 2012 at 01:55 PM
What clear flags are set on the camera that draws your HUD? Also, is there a chance a trail renderer is attached to your menu?
nah there is no trail render on, the trail is the image but disapears shortly after. then it leaves a see through imprint on the screen bit like a slug trail.
if i flip my phone around it goes away, im thinking my update isnt fast enough to deal with the image moving via touch position, my camera is orthographic and is only used to draw the ui and is set to depth only
im building as a development build and set the scripts to fast with no exceptions does this make a difference to it.
nah updates are fine, im going to have a look at the shaders next, it may be leaving the trail on a image underneath it i will do a test with out anything below it.
oh yh im using NGUI UIPanel and UIRoot to use an atlas and what not for my ui, all the code for the actual UI is done by me though, it doesnt do it in the editor though so im hoping its to do with a shader.
Your answer
![](https://koobas.hobune.stream/wayback/20220613075246im_/https://answers.unity.com/themes/thub/images/avi.jpg)