stationary camera to follow object

I’ve been looking for this and i can’t find it.
What I want to do is to have a stationary camera (position is fixed) but its orientation always follows the object.

Matematically, it would be to orient the x axis of the camera towards the diference of the object and camera position.
I could program that onto the scripts (I started to try) but i think there should be an easier way through pyton or bge modules.

Thanks in advance


use the edit actuator in trackTo mode

I’ve gone through that option, but the parameters don’t seem to be straight forward (at least for me)
The parameters I’ve got to make it work were to setup up: as Y and track -z…
Now is working

The reason it is has the y Axis up and using the -z to track is because the track to actuator it using the objects in local orientation… You can see this if you switch to local and not global.