Track To - Lock Y axis?

when I use the actuator “TrackTo” even activating the 3D button, the object lock the Y axis, making it impossible for that object to rotate on that axis. By moving the object on the X axis, it rotates around the Z axis of the object it is following. One example is that when the object is on top of the object it is following, and I move it in the X axis, it should work around the object completely, but he remains on top, spinning around him. I need it to rotate around the center of the object rotating around the object.

track to axis?

3d vs not 3d?

The track-to actuator assumes an up axis in some direction simply because this is normally what one wants.

Generally, the Z axis will point up.

If you won’t want this, you’ll have to code your own track-to solution. I believe I have an example somewhere on my hard drive that I could dig up if you want.
Hint: AlignAxisToVect is the function you are looking for.

Thanks! I research about this function and I could do this script: (Example)

import bge as g
cena = g.getCurrentScene()
o = g.getCurrentController().owner
o.alignAxisToVect(o.getVectTo(cena.objects['Empyt'], 1, 0.5)