How do you save a specific x and y coordinate from a moving object? As in, I want variables to represent the x and y of one point along a line of an object as it moves. GetX() and getY() don't work because they are constantly being updated to match the object's current position. I need for coordinates to be saved with the click of a button without the movement being affected.

