Controlling a camera to make a cutscene in Unity

 
Post new topic   Reply to topic    Unity Community Index // Unity Support
View previous topic :: View next topic  
Author Message
pipesfranco



Joined: 25 Oct 2009
Posts: 7

PostPosted: Tue Nov 03, 2009 6:59 pm    Post subject: Controlling a camera to make a cutscene in Unity Reply with quote
Hi all,

I was watching the following youtube video and I wondered how you animate and control a camera to make a cut scene in a game as either a scene file then it loads the next level or the cutscene viewed first then the player takes control and continues in FPS all within 1 scene?

the video is

http://www.youtube.com/watch?v=_I-Mpv5q_Cc&feature=player_embedded

I would really appreciate if someone could point me to a tutorial on this subject....that would really help my ongoing project.

Many Thanks

Pipes
Back to top
View user's profile Send private message
OXYGEN



Joined: 16 Mar 2008
Posts: 846
Location: Manchester UK

PostPosted: Tue Nov 03, 2009 7:28 pm    Post subject: Reply with quote
Something like this should work you will need to make
2 scripts 1 that triggers the camera of and on another that turns of your second camera on start of the game.



Code:



var camera1 : GameObject;
var camera2 : GameObject;


function OnTriggerEnter (other : Collider) {



   camera1.gameObject.active = false;
camera2.gameObject.active = true;
}




the other camera that is static has to be inactive otherwise Unity will throw up a error


so on the second camera drop this script on it.


var camera1 : GameObject;

function Start () {




camera2.gameObject.active = false;

}

_________________
http://www.oxygenstudios.co.uk
Download Osprey Iphone
http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=335948093&mt=8

AVAILABLE FOR FREELANCE IPHONE WORK
Back to top
View user's profile Send private message Visit poster's website
pipesfranco



Joined: 25 Oct 2009
Posts: 7

PostPosted: Tue Nov 03, 2009 8:46 pm    Post subject: Reply with quote
Many Thanks

How would I keyframe the cameras path to take?
Back to top
View user's profile Send private message
Sebas



Joined: 25 Oct 2009
Posts: 3

PostPosted: Tue Nov 03, 2009 10:31 pm    Post subject: Reply with quote
I have a fairly similar task to solve. I want my camera to take a predefined path without the possibility for the user to move on it's own.

What I did was probably not the most elegant solution, but it should work.
I recorded the camera path manually. I set up a script that records the Transform of the camera for each frame and I write this information to a text file.
So I basically walk the path on my own which needs to be recorded. To replay this predefined path, I just read the values from the text file again and set my camera to the recorded positions (and rotations if needed).

Cheers
Back to top
View user's profile Send private message ICQ Number
Post new topic   Reply to topic    Unity Community Index // Unity Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum