Why coordinates of instantiated object doesn't change?

Hello, I’m new to Unity and I’d like to get any help with my issue.

I have a gnome prefab object and I want to get coordinate of this object when gnome touch other objects in the scene. But coordinates of gnome are always the same as starting point.
Here is how I create gnome in the scene from prefab

GameObject newGnome = (GameObject) Instantiate (gnomePrefab, startingPoint.transform.position, Quaternion.identity);

When gnome touch some trap, I want to get coordinates of this.

Debug.Log(newGnome.transform.position.y);

But I always get the same starting point coordinates. Why?
Here is gnome prefab settings
[135283-screenshot-1.png*|135283]

UPDATE1
Here is the script SignalOnTouch. I attach this script to every trap.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;

[RequireComponent (typeof (Collider2D))]
public class SignalOnTouch : MonoBehaviour {
    public UnityEvent onTouch;
    public bool playAudio;

    private void OnCollisionEnter2D (Collision2D other) {
        SendSignal (other.gameObject);
    }

    private void OnTriggerEnter2D (Collider2D other) {
        SendSignal (other.gameObject);
    }

    public void SendSignal (GameObject gameObject) {
        if (gameObject.tag == "Player") {
            onTouch.Invoke ();
        }
    }
}

And in Unity I setup events which I want to call on touch
[135284-screenshot-4.png*|135284]

Here is the code of GameManager script

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class GameManager : Singleton<GameManager> {
    public GameObject startingPoint;
    public GameObject gnomePrefab;
    private GameObject newGnome;

    void Start () {
        Reset ();
    }

    void Update () {
    }

    public void Reset () {
        CreateNewGnome ();
        Time.timeScale = 1.0f;
    }

    void CreateNewGnome () {
        RemoveGnome ();
        newGnome = (GameObject) Instantiate (gnomePrefab, 
             startingPoint.transform.position, Quaternion.identity);
    }

    void KillGnome (Gnome.DamageType damageType) {
        Debug.Log(newGnome.transform.position.y);
    }

    public void TrapTouched () {
        KillGnome (Gnome.DamageType.Slicing);
    }
}

Gnome is connected to rope. On press down button, rope lenth increased and gnome moved down.
Here is the full source of RopeScript

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class RopeScript : MonoBehaviour {

    public GameObject ropeSegmentPrefab;
    List<GameObject> ropeSegments = new List<GameObject> ();

    public bool isIncreasing { get; set; }
    public bool isDecreasing { get; set; }

    public Rigidbody2D connectedObject;
    public float maxRopeSegmentLength = 1.0f;
    public float ropeSpeed = 4.0f;
    LineRenderer lineRenderer;

    // Start is called before the first frame update
    void Start () {
        lineRenderer = GetComponent<LineRenderer> ();
        ResetLength (); // TODO remove ?
    }

    void Update () {

        GameObject topSegment = ropeSegments[0];
        SpringJoint2D topSegmentJoint = topSegment.GetComponent<SpringJoint2D> ();
        if (isIncreasing) {
            if (topSegmentJoint.distance >= maxRopeSegmentLength) {
                CreateRopeSegment ();
            } else {
                topSegmentJoint.distance += ropeSpeed * Time.deltaTime;
            }
        }
        if (isDecreasing) {
            if (topSegmentJoint.distance <= 0.005f) {
                RemoveRopeSegment ();
            } else {
                topSegmentJoint.distance -= ropeSpeed *
                    Time.deltaTime;
            }
        }
        if (lineRenderer != null) {

            lineRenderer.positionCount = ropeSegments.Count + 2;
            lineRenderer.SetPosition (0, this.transform.position);

            for (int i = 0; i < ropeSegments.Count; i++) {
                lineRenderer.SetPosition (i + 1,
                    ropeSegments*.transform.position);*

}

SpringJoint2D connectedObjectJoint = connectedObject.GetComponent ();
lineRenderer.SetPosition (ropeSegments.Count + 1, connectedObject.transform.TransformPoint (connectedObjectJoint.anchor));
}
}

public void ResetLength () {
foreach (GameObject segment in ropeSegments) {
Destroy (segment);
}
ropeSegments = new List ();
isDecreasing = false;
isIncreasing = false;
CreateRopeSegment ();
}

void CreateRopeSegment () {

GameObject segment = (GameObject) Instantiate (ropeSegmentPrefab, this.transform.position, Quaternion.identity);

segment.transform.SetParent (this.transform, true);

Rigidbody2D segmentBody = segment.GetComponent ();
SpringJoint2D segmentJoint = segment.GetComponent ();

if (segmentBody == null || segmentJoint == null) {
Debug.LogError ("Rope segment body prefab has no " + “Rigidbody2D and/or SpringJoint2D!”);
return;
}

ropeSegments.Insert (0, segment);

if (ropeSegments.Count == 1) {

SpringJoint2D connectedObjectJoint = connectedObject.GetComponent ();
connectedObjectJoint.connectedBody = segmentBody;
connectedObjectJoint.distance = 0.1f;

segmentJoint.distance = maxRopeSegmentLength;
} else {

GameObject nextSegment = ropeSegments[1];

SpringJoint2D nextSegmentJoint = nextSegment.GetComponent ();
nextSegmentJoint.connectedBody = segmentBody;
segmentJoint.distance = 0.0f;
}
segmentJoint.connectedBody = this.GetComponent ();
}

void RemoveRopeSegment () {
if (ropeSegments.Count < 2) {
return;
}

GameObject topSegment = ropeSegments[0];
GameObject nextSegment = ropeSegments[1];

SpringJoint2D nextSegmentJoint =
nextSegment.GetComponent ();
nextSegmentJoint.connectedBody =
this.GetComponent ();

ropeSegments.RemoveAt (0);
Destroy (topSegment);
}
}
*
*

With animated objects… you’ll need to check which bone in the hierarchy the collider(s) is attached to.
Animations are usually delivered in 2 ways. 1) walking and running animations… dont move the character… and code moves the root. 2) the animation moves a child object away from the root, but the root stays still. version 2 can cause collision problems like you are describing…

If collider is on the root of the object… perhaps the gnome is animated away from the root position with other bones as in option 2 above… if so, the collider (on the root) won’t move with the gnome.

So check that first, also check how the root moves compared with the gnome in scene view.
If so, then attach to hips or something further down the hierarchy.

You could also put simple box and sphere colliders on key bones in the gnome to use as triggers for when gnome touches something. (if you need to get more accurate than capsule collider)

If your collisions are working, but the co-ordinates are static, keep a reference to a transform on the gnome such as abdomen or hips, not the object root. then use the world position of that object ( not local) after detecting the collision.
Another option, if your code is using functions… OnCollisionEnter… that passes in the collision information to you, so you can use collision.point which is exactly the collision point (or array of collision points)

finally, I got it. Rope with gnome was connected by body of the gnome in GameManeger script

public RopeScript rope;
rope.connectedObject = currentGnome.ropeBody;

Coordinates of ropeBody are correct. Thank you guys for suggestions and help! @xxmariofer @highpockets @Bonfire-Boy