how do i make an object "snap" to the position of another object?

really its all in the title. all i want to do is have object one snap to the position of object two. i have tried doing this with python but i was unsuccessful, any help is greatly appreciated

click object 1, then object – snap – cursor to selected.

then right click object 2 and object – snap – selected to cursor.



targetObj.worldPosition = sourceObject.worldPosition


its still not working. heres a few screenshots that might help:

Attachments




you might want to print the positions to the console before and after assigning them:


print ("target = "+str(bot1.worldPosition)+", source = "+str(reset.worldPosition))

ok it didnt work untill i scaled the “checkpoint” down. :confused:

also i think you should move to python early asap for simplicity and ease of change