'Track to' via python

this return 1 float and 2 vectors:
vec = own.getVectTo(target.name)

this should work
vec = own.getVectTo(target.name)[1]

PS: if the distance is 0.0 (improbable but possible overall with objects statics)
you can get a error
i suggest to write this way:


cont = bge.logic.getCurrentController()
own = cont.owner


sens = cont.sensors['Always']

scene = bge.logic.getCurrentScene()
target = scene.objects ["blue"]


if sens.positive:
    distance, vec_global, vec_local = own.getVectTo(target.name)
    if distance > 0.0:
        own.alignAxisToVect(vec_global,1,1.0)