The child object doesn't follow it's parent. What's the cause of this?

I’m using Unity 2019.02.0f1 Personal Edition. I noticed a strange behaviour of my GameObjects in the viewport of my 2D project.
The hierarchy looks like this:
-Enemy an empty GameObject, position: 0, 0, 0 scale: 1, 1, 1
-GFX (child of Enemy) GameObject with sprite, position: 0, 0, 0 scale: 10, 10, 1

  • Weapons (child of Enemy) empty GameObject position: 0, 0, 0 scale 1, 1, 1
    -Left Weapon (child of Weapons) GameObject with sprite position: -10.5, 0, 0 scale 7, 7, 1
    -Right Weapon (child of Weapons) GameObject with sprite position: 10.5, 0, 0 scale 7, 7, 1
    If it isn’t clear look at this screenshot:

    When the Enemy object is at 0, 0, 0 position the pivot looks normal - it’s in the middle as its supposed to
    But when I move it the rest of the objects doesn’t follow and the pivot (crossed arrows) are far away from the rest. I looks like this:

    The left weapon’s pivot moves, but right one’s stays in place and the whole enemy pivot is far away.
    Does anyone know the cause of this.
    If you want to recreate this behaviour:
  1. Donload, unzip and import the Unity Package Download this
  2. Place the enemy prefab into the scene (preferrebly at 0, 0, 0)
  3. Move around in any direction.

Thank you in advance.

It’s possible your handler is set to ‘Center’. Try changing it to Pivot.


144354-pivot.png