Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Sprite Atlas

Discussion in '2D' started by jjkrr, May 22, 2020.

  1. jjkrr

    jjkrr

    Joined:
    Dec 3, 2018
    Posts:
    23
    Say you have a series of sprites for an animation but they are different sizes, maybe calling for different sized canvases, and you import them they will all have different pivot points and thus the sprite will jump all over the place while the animation is playing.

    For anybody who uses the sprite atlas, how does it avoid this problem?
     
  2. brigas

    brigas

    Joined:
    Oct 4, 2014
    Posts:
    522
    you can set the pivot point for each sprite
     
  3. jjkrr

    jjkrr

    Joined:
    Dec 3, 2018
    Posts:
    23
    Yes but how do you know where each pivot point should be in relation to all the other pivot points so there is a seamless animation?
     
  4. brigas

    brigas

    Joined:
    Oct 4, 2014
    Posts:
    522
    you need to have an original sprite with full canvas and calculate the new pivots of the cropped sprites based on that