FragMate CommunityLog in

FragMate - Software and Game Developer Community, including Resources, Forums, Marketplace & More.

Share

descriptionHelp making script to change from FPS to TPS

more_horiz
I need help for making FPS camera to TPS, Help me with the scripts, I am Newbie

descriptionRe: Help making script to change from FPS to TPS

more_horiz
Start the script with:

var 1st Person Cam : gameObject;
var 3rd Person Cam : gameObject;

thats all i know Smile

descriptionRe: Help making script to change from FPS to TPS

more_horiz
Add this script to an empty GameObject and assign the cameras in the editor.

var cam01 : GameObject; // first person
var cam02 : GameObject; // third person

//start with first person active
function Start() {
   cam01.gameObject.active = true;
   cam02.gameObject.active = false;
}

//check for the return keyDown
function Update() {

 if (Input.GetKeyDown ("return")) {

cam01.gameObject.active = false;
cam02.gameObject.active = true;

}

}


If you want to toggle between cameras using the same key you'll need to use an if statement and a boolean to check which camera is active.

descriptionRe: Help making script to change from FPS to TPS

more_horiz
hey i'm new in this website

descriptionRe: Help making script to change from FPS to TPS

more_horiz
please help me to make the fps game scripts.........
Permissions in this forum:
You cannot reply to topics in this forum