I'm, trying to integrate LookAt in my game and have so far been unsuccessful.
In the game the character runs around and the player views him from a distance from a bunch of different fixed cameras scattered around the level in different rooms. When the character walks to a certain area/room, he triggers an event which causes the current camera to deactivate and activate the next one as to have a better view of him. So far I have achieved this. However, I want the camera that activates to be focused at on the character either at all times or at least to start off with. This is because I do not know exactly where the character is going to trigger the camera switch so it cannot be preset, I need the camera to be focused on the character.
I managed to achieve this before, but since I restarted from scratch I can no longer get it to work.
I think it hast to do with setting the characters position as a global variable and have the LookAt vector set to this position, but I cannot seem to get it working.
Any ideas?
Thanks