Unit Possession
by Ben Sparks - Warspawn · in RTS Starter Kit · 05/07/2007 (4:29 pm) · 4 replies
What I want to do is be able to select one of the units in the RTS view and then have the option to "possess" that unit and run around in normal fps view and controls. Obviously without AI the other units would just stand there and do nothing (or perhaps continue harvesting).
Is this something that is going to be a major pain to do or will it be just switching the camera and controls pretty much? I assume that since the RTSUnit class doesn't have any of those controls and has a bunch of other stuff that isn't necessary for first person that I would need to make a new class. Is there a way to swap out objects or something? Or maybe I need to just bloat up the RTSUnit class to allow for such controls. Any help on where to start or possible things to watch out for would be great.
Is this something that is going to be a major pain to do or will it be just switching the camera and controls pretty much? I assume that since the RTSUnit class doesn't have any of those controls and has a bunch of other stuff that isn't necessary for first person that I would need to make a new class. Is there a way to swap out objects or something? Or maybe I need to just bloat up the RTSUnit class to allow for such controls. Any help on where to start or possible things to watch out for would be great.
About the author
I'm a web developer by day, hobbyist game developer by night.
#2
- Figure if RTS or Normal or Adv Cam is needed
- map same input controls as FPS
- add code to handle forward, back, left, right..etc. instead of the normal Mouse Click code.(point to point)
- Merge code from FPS as needed.
www.enchantedrealmsllc.com
05/10/2007 (10:59 am)
I have seen in the forums that you can switch back to the normal or Advanced camera resource. Try using that instead of the normal RTSCamera. Though you can probably just lock the RTSCam to the unit you've selected. Some other issues I can think of are:- Figure if RTS or Normal or Adv Cam is needed
- map same input controls as FPS
- add code to handle forward, back, left, right..etc. instead of the normal Mouse Click code.(point to point)
- Merge code from FPS as needed.
www.enchantedrealmsllc.com
#3
05/11/2007 (11:08 am)
Thanks for the ideas, I think I'll start by simply adding back in the FPS controls and see what happens, then go from there with the camera.
#4
05/11/2007 (7:59 pm)
You'll also probably have to redo processtick, pack and unpack to include more from player.
Torque 3D Owner Novack
CyberianSoftware
There are a couple of posts about that, so at first, what i recomend you is to search in the forums. I believe reading some of this posts will give you some hint or good direction.