camera mode switching

Hi,

thanks for reading this.

my goal is to use two cameras: one will follow the character’s movements in a “combat” mode ala star wars battlefront. the other will be a standard mouse orbit type–an “exploration” mode. the user will be able to switch cameras by pressing a button based on gameplay situations.

i am trying to set up a dual analog stick system (or w/a/s/d and L/R/U/D or mouse).

in “combat” mode the primary analog stick moves forward/backpedals and strafes. the secondary stick turns the player left/right and looks up/down. i do not know how to write this script.

in “exploration” mode, the primary stick moves the character in all four directions (always walking or running, no backpedaling or strafing) while the secondary stick orbits the camera. i think the standard mouse orbit script will work for this. i am assuming that the player movement is not hard either–just realigning vetctor3.forward to the camera.

do i need two third-person movement scripts since the characters actions will be slightly different depending on which mode the user is in? or will i only need one script and just separate the different modes into subroutines?

how do i switch between the cameras? can you reassign tags inside a script?

i can’t imagine any of the scripts i need are difficult, but i am a noob at programming. if there were tutorials on how to create a complete movement script from scratch that would be immensely helpful. the scripts included in the Lerptz platform tutorial are too character specific and i get lost trying to dissect and re-work existing scripts.

any help is welcome.

thanks,

-b

Either could work - you could create a new script for the combat mode which would disable the third-person movement script. Although I would recommend instead creating a custom version of the third-person script to suit your needs.

That depends on how you implemented the two camera setups.

Yes.

There is no general movement script because of it being character specific by nature. I would recommend browsing the wiki and the forum to learn more about unity scripting. Also you should stop by the irc channel.

Wiki:

IRC channel:
http://www.unifycommunity.com/wiki/index.php?title=IRC

thanks Mr. Ant. i am investigating your suggestions.