Question about getPosition() and setPosition()

I have an object located initially at [10,10,10].
When I start the game engine I moved the object to [0,0,0] using setPosition() method.
This works find and the object is located at [0,0,0] as the game starts.
However, if I get the position of the object using getPosition()method, it returns the initial position of [10,10,10].

print obj.getPosition() --> prints [10,10,10]
obj.setPosition([0,0,0]) --> moves the object to [0,0,0]
print obj.getPosition() --> still prints [10,10,10]

Is this normal behavior?
I need to move the obj several times based on the current position. If etPositoin() method do not reflect the current position of the object then is there any other way to get the current position of the object?

Thanks in advance.

Hmm… the position get’s updated every pulse that’s fired to run the script. So say you run the script, the only way you can have the object set to a different position throughout time is if it’s pulsed that amount of times.

Say you have
always(pulse mode on)->python(setPos)

setPos
print obj.getPosition()
print obj.setPosition()

Now it should print commands like crazy, but the position would have been updated.

Jason Lin