Why are the pivots for my sprites always off-center?
I have a simple sprite that I've centered perfectly in photoshop, and the pivot shows off-center. When I rotate the sprite, as you would expect, it wobbles around that pivot. This is a single sprite.
If you select the sprite texture, is the 'Pivot' set to 'Center' in the Inspector?
I have the exact same problem...but I can't find anything on it. Have you found out how to fix this?
Answer by Rdubb · Dec 05, 2016 at 02:16 AM
Thread looks pretty dead but I had this same problem today. Turns out, it was due to putting all the "problem" sprites into an empty game object (for asset organization in the scene hierarchy).
The problem was that I forgot to set the empty object to 0,0,0 before putting sprites into it. This caused the sprites to inherit the slight offset from the empty object. So, when I set the spites to 0,0,0, they were being positioned relative to the empty object's home, rather than the absolute home of the scene.
Definite facepalm moment for me. Hope it's a simple fix for anyone else reading this :)
I think this was also the problem for me! However, I can't find a sane way to fix it -- I fixed the original prefab, and new instances of the prefab are correct, however old instances are still stuck with the bad origin. I've tried the big "Prefab: Revert" button, as well as the Gear -> Revert to Prefab option for every component, including Transform. Nothing seems to work -- now I have two see$$anonymous$$gly identical sprites in the same scene, but with slightly different origins.
Extra frustrating to know what the problem is, without being able to coax Unity into doing what I want. Ah well.
D'oh, actually that wasn't the problem -- the problem was I had all my sprites in a container (for grouping) that wasn't aligned to my grid. Painfully obvious in retrospect :(
Your answer
Follow this Question
Related Questions
Broken animations in Unity 5.3.5f 1 Answer
Starting animation on specific time (%) with scene preview? 0 Answers
Odd twitching when using deltaTime 1 Answer
Animator and code controlled bone rotations 0 Answers
Whenever the animition is starting, it set the rotation of my character to (0,0,0) 0 Answers