how to get the position of a game object?

so, thats the question, how do i get the position of an object in the game escene?


Google and the Blender Python API are your friends. Use them.

sure they are,
i use this to get the position of the owner(the obj who runs the script), but i want to get the position of ANOTHER object…

Use the scene.objects list to find your object:

from bge import logic

sce = logic.getCurrentScene()

theotherobject = sce.objects['TheOtherObject']

print (theotherobject.worldPosition)

thanks solarlune, that is what i wanted :smiley: