Forum begins after the advertisement:


[Part 5] Static objects twitch

Home Forums Video Game Tutorial Series Creating a Metroidvania in Unity [Part 5] Static objects twitch

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #14051
    Алексей Буйлов
    Level 3
    Participant
    Helpful?
    Up
    0
    ::

    Good evening. This is the problem: static objects twitch, for example, which is clearly visible in the video, part of a column in the background. How to fix it?

    View post on imgur.com
    #14061
    Terence
    Level 30
    Keymaster
    Helpful?
    Up
    0
    ::

    Thanks for posting the video Alexus. You can set the player character’s Rigidbody2D to Interpolate, and that can possibly fix the issue.

    Here’s an article that explains this phenomenon with more details: https://blog.terresquall.com/2021/12/fix-jittery-camera-movement-in-unity-with-rigidbody-interpolate/

    Let me know if this does / doesn’t work.

    #14063
    Алексей Буйлов
    Level 3
    Participant
    Helpful?
    Up
    0
    ::

    It’s already there, I tried changing it to other parameters, nothing changed.

    #14064
    Terence
    Level 30
    Keymaster
    Helpful?
    Up
    0
    ::

    Sorry Alexus, I don’t know which static object you’re referring to that is twitching in the video. Do you mean that the animations for the static objects (e.g. grass) are twitchy?

    #14083
    Алексей Буйлов
    Level 3
    Participant
    Helpful?
    Up
    0
    ::

    Mostly only parts of the column in the background are twitching, the grass is ok. https://drive.google.com/file/d/1ymJ-PWyw_0sar0a_4vYUor0u839wjiSY/view?usp=drive_link

    #14126
    Terence
    Level 30
    Keymaster
    Helpful?
    Up
    0
    ::

    I see what you are talking about now. Do you have multiple sprites on the same Z-axis? If you do, separate them a little bit. If they are overlapping, then the flickering will appear because they are competing to be drawn.

    #14130
    Алексей Буйлов
    Level 3
    Participant
    Helpful?
    Up
    0
    ::

    I moved them apart a little and the flickering disappeared, thank you. Is it possible to somehow get rid of flickering, its objects are superimposed on each other in cases where this is necessary for design?

    #14223
    Алексей Буйлов
    Level 3
    Participant
    Helpful?
    Up
    0
    ::

    A quick question: I accidentally opened the development environment in this form, how can I get it back?

    View post on imgur.com
    #14263
    Joseph Tang
    Level 13
    Moderator
    Helpful?
    Up
    0
    ::

    Sorry for the late response, but i’m unsure of whether this is an intentional outcome or accidental. As in, the placement of the diagonal column is below the map, but could it be functioning normally/as intended in the game view? Or it’s placement in the 3d/perspective view is far on the z axis to appear differently on the camera?

    #14267
    Terence
    Level 30
    Keymaster
    Helpful?
    Up
    0
    ::

    Sorry for missing your posts Alexus.

    Is it possible to somehow get rid of flickering, its objects are superimposed on each other in cases where this is necessary for design?

    You can use the Sorting Layer or Order in Layer properties on the Sprite Renderer to specify which sprites should be rendered first. This should fix the flickering issue.

    Otherwise, you can separate objects very slightly on the Z-axis, e.g. -9.99 for one sprite, and -9.98 for the sprite that is supposed to be in front of it.

    A quick question: I accidentally opened the development environment in this form, how can I get it back?

    Go to Window > Layout and Reset the editor layout. This part of our video talks about it (timestamped for you):

    #14286
    Алексей Буйлов
    Level 3
    Participant
    Helpful?
    Up
    0
    ::

    Thank you

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.

Go to Login Page →


Advertisement below: