|
hello. I am currently working on a 3rd person shooter game, and I have come into a problem. I can't seem to figure out how to make the cameras switch from one another depending on the position of the character. example: you character is walking down a hallway, and there is a fixed camera. when you turn a corner, it automatically switches to another camera to give you a view of your character after the turn. If anyone could help with this it would be much appreciated. I have almost no scripting knowledge, so the little bits of help I could find here did little good because I had no idea what to do with the scripts.
(comments are locked)
|
|
Set up a bunch of triggers in the world (i.e. make a bunch of box colliders or whatever and check this "is trigger" sketch on them). Put something similar to this on those game objects (untested and I don't use javascript so it probably doesn't even compile):
Basically you need to set up your world where you have a bunch of disabled cameras, and when you enter a zone it turns on the camera for that zone. There's a little bit more to it than that, like maybe having a default fallback camera that's above the player or something. Or turning off the main camera when you enter a zone (probably just by setting ok, question: how do you disable cameras? I couldn't figure that out either. every time I add a new camera it starts off with that one.
Jul 03 '10 at 05:45 PM
Dbag
The same way you disable any other game object.
Jul 03 '10 at 06:57 PM
Tetrad
ok, how do you do that? I am very new to this
Jul 05 '10 at 10:22 PM
Dbag
Get a reference to it somehow and set its enabled flag to false.
Jul 06 '10 at 12:27 AM
Tetrad
ok. how do I get a reference, what is a flag, and how do I enable it to false? this all sounds like gibberish to me
Jul 07 '10 at 07:53 PM
Dbag
(comments are locked)
|
