Search Unity

(Gimp) How to find center of selection?

Discussion in 'Formats & External Tools' started by Josiah_Ironclad, May 13, 2020.

  1. Josiah_Ironclad

    Josiah_Ironclad

    Joined:
    Sep 24, 2019
    Posts:
    156
    EDIT: After some more thinking, and testing, I figured this isn't actually an external tools topic, but a Unity Editor one. Though obviously I can't move or delete the thread myself.

    I'm working on an off-screen indicator, to show at the edge of the screen when a boss is nearby. And in order to make it behave correctly, I need to set its pivot at the center of the hole it has, but I'm having some trouble figuring out that position.

    This is what it looks like in Gimp:
    upload_2020-5-13_1-26-43.png

    Any tool or calculation I could use to figure it out? Not in Gimp, but when choosing a custom pivot in the Sprite Editor in Unity.

    The height of the image is 448 pixels, the center of the hole is 279 pixels from the top (169 from the bottom).
     
    Last edited: May 13, 2020
  2. MegamaDev

    MegamaDev

    Joined:
    Jul 17, 2017
    Posts:
    77
    Try setting the sprite editor's "Pivot Unit Mode" to "Pixels." Set the pivot to "Custom," and you can then enter the from-the-bottom value in the Y box. (Yeah, from the bottom. Unity's Y coordinate goes the opposite direction from GIMP's. Gets annoying when you're trying to load textures with a custom protocol, but that's not particularly relevant.)
     
    Josiah_Ironclad likes this.