About setPos and getPos

I wrote a class named “Pet”.
When there is only one instance about Pet, I can control the pet anyway by calling the function in Pet.

When there are 4 instances of Pet, my programe cann’t distinguish them.
When I drag one of them, all of them move with my mouse(The right thing is the one who clicked will move).

import Pet

def main():

    #load 4 girl
    girl_chun = Pet.Pet("pet", Pet.PET_TYPE_GIRL, "girl_chun/girl_chun.egg")
    girl_xia  = Pet.Pet("pet", Pet.PET_TYPE_GIRL, "girl_xia/girl_xia.egg")
    girl_qiu  = Pet.Pet("pet", Pet.PET_TYPE_GIRL, "girl_qiu/girl_qiu.egg")
    girl_dong = Pet.Pet("pet", Pet.PET_TYPE_GIRL, "girl_dong/girl_dong.egg")

    #SETPOS
    girl_chun.setPos(2, 0, -2)
    girl_xia.setPos(-2, 0, -2)
    girl_qiu.setPos(2, 0, 2)
    girl_dong.setPos(-2, 0, 2)

    #Find coat
    girl_chun_hair = girl_chun.find("**/hair")
    girl_chun_shoes = girl_chun.find("**/shoes")
    girl_chun_coat = girl_chun.find("**/coat")
    girl_chun_pant = girl_chun.find("**/pant")
    
    girl_dong_hair = girl_dong.find("**/hair")
    girl_dong_shoes = girl_dong.find("**/shoes")
    girl_dong_coat = girl_dong.find("**/coat")
    girl_dong_pant = girl_dong.find("**/pant")
    
    girl_xia_hair = girl_xia.find("**/hair")
    girl_xia_shoes = girl_xia.find("**/shoes")
    girl_xia_coat = girl_xia.find("**/coat")
    girl_xia_pant = girl_xia.find("**/pant")
    
    girl_qiu_hair = girl_qiu.find("**/hair")
    girl_qiu_shoes = girl_qiu.find("**/shoes")
    girl_qiu_coat = girl_qiu.find("**/coat")
    girl_qiu_pant = girl_qiu.find("**/pant")
  
    pos_xia = girl_xia_coat.getPos()
    pos_dong = girl_dong_coat.getPos()
    print pos_xia, pos_dong
    
    base.camera.setPos(0,-20,0)
    #Pet.setupLights()
    run()


if __name__ == '__main__':main()

The print result is

Point3(0, 0, 0) Point3(0, 0, 0)

Why? What’s wrong?

getPos returns relative position. Try:

    pos_xia = girl_xia_coat.getPos(render)
    pos_dong = girl_dong_coat.getPos(render)
    print pos_xia, pos_dong