Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

UI flickering effect image movement

Discussion in 'UGUI & TextMesh Pro' started by alex181189, Jan 17, 2019.

  1. alex181189

    alex181189

    Joined:
    Sep 27, 2016
    Posts:
    10
    Hello, I'm new to the forum, in Unity is happening a strange thing, maybe you know why.

    I'm moving some gameObjects with an Image component with a sprite none with FixedUpdate and Time.fixedDeltaTime.

    what is happening to me is this is doing a flickering effect, do you know why is this happening?

    I'm trying some things, if I touch the canvas, tested update and OnGUI, I have touched the Project Setting + Quality etc ..
    The only thing that improves something is the "anti aliasing" but if I raise it a lot it starts to go slow

    My version of Unity3d is: 2018.3.0f2

    Below I leave the examples, video is scale 5x


    Thank you a lot.
    Alejandro Manzano.
     
    Divertap likes this.
  2. pointcache

    pointcache

    Joined:
    Sep 22, 2012
    Posts:
    577
    Seems your canvas is in pixel perfect mode
     
    deuterocanonico and Divertap like this.
  3. alex181189

    alex181189

    Joined:
    Sep 27, 2016
    Posts:
    10
  4. alex181189

    alex181189

    Joined:
    Sep 27, 2016
    Posts:
    10
    Hi?
     
    Divertap likes this.
  5. Divertap

    Divertap

    Joined:
    Jan 4, 2017
    Posts:
    10
    Something similar is happening to me, have you been able to solve it?
     
  6. KarambaMax

    KarambaMax

    Joined:
    Dec 23, 2018
    Posts:
    3
    I also have this problem. I googled a fair amount and this was the only thread about this problem, somebody help.
    Btw i am very new to unity. I have a bit of programming experience in python 3.
     
  7. Divertap

    Divertap

    Joined:
    Jan 4, 2017
    Posts:
    10
    no, I've not been able to solve it, maybe someone from the forum knows why it happens, because this is a big problem in my project.
     
  8. beanie4now

    beanie4now

    Joined:
    Apr 22, 2018
    Posts:
    311
    lowres.PNG

    Try disabling this.
     
  9. alex181189

    alex181189

    Joined:
    Sep 27, 2016
    Posts:
    10
    oh that's a great idea, but this helps a lot in the editor, when I export in Webgl it doesn't work :(
     
  10. beanie4now

    beanie4now

    Joined:
    Apr 22, 2018
    Posts:
    311
    Then I would try experimenting with forced resolutions for your game window. Seems you have a mismatch between pixel size and screen area
     
  11. KarambaMax

    KarambaMax

    Joined:
    Dec 23, 2018
    Posts:
    3
    It didn't work for me tried all the different ratios like 3:4, 16:9.
     
  12. alex181189

    alex181189

    Joined:
    Sep 27, 2016
    Posts:
    10
    Think that it's in x5 scale, it is a small object, the problem is that I have about 300 of these objects, and when it makes that kind of effect it makes a kind of blink and it looks very bad, I have 1920x1080 scale.

    Thanks.
     

    Attached Files:

  13. Divertap

    Divertap

    Joined:
    Jan 4, 2017
    Posts:
    10
    It didn't work for me.
     
  14. KarambaMax

    KarambaMax

    Joined:
    Dec 23, 2018
    Posts:
    3
    The problem dissapeard when i used this code instead.
    i followed this guy's tutorial


    NVM didn't actually fix the problem
     

    Attached Files:

    Last edited: Mar 23, 2019
  15. alex181189

    alex181189

    Joined:
    Sep 27, 2016
    Posts:
    10
    I can't follow this tutorial because I'm using the UI, I move it in this way
    While I'm creating new gameObject I'm gradually increasing the size of the content

    candleGraphContainer.sizeDelta = new Vector2(candleGraphContainer.sizeDelta.x + Time.fixedDeltaTime, candleGraphContainer.sizeDelta.y);

    and I move his father for it goes moving

    ChartVisual.offsetMin = new Vector2(ChartVisual.offsetMin.x + Time.fixedDeltaTime , ChartVisual.offsetMin.y);
     
  16. Divertap

    Divertap

    Joined:
    Jan 4, 2017
    Posts:
    10
    ¿Have you found any solution?
     
  17. Divertap

    Divertap

    Joined:
    Jan 4, 2017
    Posts:
    10
    I will send you a video and a simple project to see if you could find a failure
     

    Attached Files:

    • Assets.zip
      File size:
      13.7 KB
      Views:
      344
    • 3.png
      3.png
      File size:
      81.2 KB
      Views:
      564
    • 2.png
      2.png
      File size:
      53.3 KB
      Views:
      563
    • 1.png
      1.png
      File size:
      39.3 KB
      Views:
      568
  18. su9257

    su9257

    Joined:
    Jun 13, 2017
    Posts:
    27
    Hi,I have the same problem. Have you found the solution?
     
  19. ujz

    ujz

    Joined:
    Feb 17, 2020
    Posts:
    29
    I had similar flickering problems when animating UI objects. After setting my canvas to "pixel perfect" the problems went away.
    upload_2022-12-6_16-6-37.png

    Also maybe related, but when moving or animating UI objects, it helped to use even numbers. For example, when bobbing an icon with a Sin wave, if bob was 8 or 10 pixels there was no jitter but 7 or 9 pixels some jitter.
     
  20. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,316
    Please don't necro posts. Also, this thread shouldn't even be on the 2D forum so I'll move it to the UI forum.
     
  21. DeadCastles

    DeadCastles

    Joined:
    Sep 23, 2019
    Posts:
    14
    I'm having this same problem.