Game Development Community

Have the camera center on the player?

by Tyler Slabinski · in Torque Game Builder · 07/26/2008 (2:27 pm) · 2 replies

Ok... I remember doing this a lot of times before, but I strayed away from TGB to TGE for a little while.

Anyway, I was wondering. How do I make the camera follow the player? I seem to forget that part.

#1
07/26/2008 (2:57 pm)
%sceneWindow.mount(%playerId, %offsetXY, %mountForce, %sendToMount);

If you haven't changed it, %sceneWindow refers to the object named "sceneWindow2d".
#2
07/26/2008 (4:19 pm)
Ohh, thanks! I remember doing it a different way, but this one is shorter and quicker.