Copy Global Position

Hi :eyebrowlift:

Recently I work on copy location from other object. Currently I have script which always copying the position.
But now I want implement one modify for the script:
Normaly It is copy all the axis: X, Y, Z.
Now I want the same but with one unit down in one axis: X , Y, Z-1. Because it would be better if object will under.

Normal script: >file<

Not working after modifaction: >file<

Sorry for my English again.

why you do not simply parent the objects together?

Because when the first object will rotate the second also with them. The second object must be always under. That is my plan. I show you my result when I finish.

You can use Vertex Parent to avoid rotation.

Using a Python controller results in a one frame gap anyway.

Thanks a lot. Currently I have just 2 working ways for that. My script is now working and Vertex also.
I promised tell you why do I need it.

Recently I working on change mass of object and you told me it is impossible to change mass few times.
I don’t give up with this and I invented new way for changing mass.
The gravitation working vertically down. So my script too.
First object have force power track to object under him. So the direct of force is always down as gravitation.
Now I think you know why I wanted that.

Vertex Parent

copy loc Z-1