Creating RTS Player camera control
by John H · in Torque Game Engine · 03/28/2004 (9:20 pm) · 4 replies
I am a big fan of RTS type games. My first project with the engine is to create a RTS Player class. I am looking for some direction on how to modify the Player camera to behave like the 'free camera' in the demo. I want to remove the player model, and have the player be a free floating camera that collides with the terrain.
Instead of just setting the camera as the control object, how would I set the default player camera to behave like the free floating camera in the demo?
Thanks!
Instead of just setting the camera as the control object, how would I set the default player camera to behave like the free floating camera in the demo?
Thanks!
#2
Instead of having a just a free floating camera, I was under the impression that creating a Player like class to manage client attributes and have RTS camera controls apposed to a FPS camera would be a good way to implement this. I may be looking at this a little too criticaly. I'm new to torque and still a little unclear on how the camera system works.
I guess I'm looking for some insight on the best way to do this. Would just setting the control object as the camera be ideal?
thanks!
03/29/2004 (7:13 am)
Ben,Instead of having a just a free floating camera, I was under the impression that creating a Player like class to manage client attributes and have RTS camera controls apposed to a FPS camera would be a good way to implement this. I may be looking at this a little too criticaly. I'm new to torque and still a little unclear on how the camera system works.
I guess I'm looking for some insight on the best way to do this. Would just setting the control object as the camera be ideal?
thanks!
#3
03/29/2004 (8:55 am)
My experience has been that making a subclass of the normal Camera class with the added desired functionality gives the best results. For instance, an RTSCamera with extra collision code and tracking logic.
#4
03/29/2004 (9:51 am)
Perfect, thanks!
Associate Kyle Carter