Search Unity

Zelda Style Camera

Discussion in 'Editor & General Support' started by ravsters, Feb 26, 2008.

  1. ravsters

    ravsters

    Joined:
    Jan 18, 2008
    Posts:
    30
    http://youtube.com/watch?v=ykVg7pDo-zE

    I am pretty sure Unity can pull this off but I wanted to know if it can do what is shown at the start of the 2:15 mark and the 3:45 mark.

    Basically switching to a fixed camera and back.

    Also... is it possible to set up the game like it is in Zelda (having the main overworld then when you get to an area it loads it up?)

    Thanks!!!
     
  2. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Ah - lovely to see this game once again. It's been one of my "all-time favorites"... Legend of Zelda, Ocarina of Time. Incredibly lovely done (played it through in about 24 hours, with only a short sleeping break, and literally cried when it was over because it touched me so deeply :) ).

    Concerning your questions:

    The question is not that much "can Unity do this" but "can you do this" or: can you get a script that already does this ;-) Shouldn't be too hard, but generally speaking, 3rd person cameras are not trivial to implement...

    Switching between fixed camera and back, however, is trivial... It's also explained in the 3D-plattform tutorial (there, it's used for a cut-scene, but that doesn't make a difference - the logic is the same, in principle). I guess you would simply use a trigger that switches to the fixed cam when you character enters it, and back, when the character leaves it.

    Also, having one "overworld" and triggers to load specific levels should be more or less trivial to set up... You just have to be sure to respawn your character outside of the trigger area, or you'll get funny loops / bounces ;-)

    You're welcome ;-)

    Jashan
     
  3. ravsters

    ravsters

    Joined:
    Jan 18, 2008
    Posts:
    30
    thanks for the great explanation! I want this game to be non linear so I'm trying to make it so you can go anywhere in the game.

    So switching the cameras inst going to be too hard... thats good cause it will make it a bit easier on me :) I will showcasing my game soon enough... I cant wait to get feed back!

    If there is anyone out there that already had a script for zelda style movement and camera control... can I please take a look at it THANKS!! :)
     
  4. hai_ok

    hai_ok

    Joined:
    Jun 20, 2007
    Posts:
    193
    I have considered putting the interiors of small buildings and simple areas into a "box".

    say you have a small house, for instance. Use a low Level of Detail on the house that is displayed on the world map, and put a higher detail object into a portable skybox with the area surrounding the small house, mapped onto the insides.

    if you have pro, you could position cameras outside of the house and use render.to.texture show what's going on outside of the house, on the inside of the box. otherwise, you could just do screen caps or renders and make the skybox in your favorite 3d app (besides unity).

    put the box below the lowest part of the terrain. When the player enters, teleport them, the lights and the camera to the inside of the box. inside of here, you can add detail that would slow down the world. It would be loaded with the rest of the level, but not displayed until you need it.

    still working on this. and wondering if it is the best way to handle it. any suggestions?

    I've used engines in the past that sped up greatly if you hid things or used a shallow clip distance.

    is there a on/off switch that would make this technique work well enough to negate the overhead of loading a handfull of "pocket" levels in along with the world map?

    Like having a world map with the low detail house, and instantiating the high detail house when you teleport to the box. Is this possible?
     
  5. ravsters

    ravsters

    Joined:
    Jan 18, 2008
    Posts:
    30
    is it possible in general?
     
  6. forestjohnson

    forestjohnson

    Joined:
    Oct 1, 2005
    Posts:
    1,370
    Word, brother ;)

    Yeah, sure its possible to set up your scene like zelda. It would work fine. There are many LOD approaches you can take and they would fit different situations.

    A good starting point for this type of camera would be the third person tutorial camera.
     
  7. ravsters

    ravsters

    Joined:
    Jan 18, 2008
    Posts:
    30
    What are LOD's haha Sorry I'm a noob :eek:

    Also is it possible to have a cutscene play once you enter a certain area

    for example... lets say you are walking into a forest then bam (cutscene) you are attacked then bam boss battle?
     
  8. ravsters

    ravsters

    Joined:
    Jan 18, 2008
    Posts:
    30
    I got it somewhat working...
     
  9. forestjohnson

    forestjohnson

    Joined:
    Oct 1, 2005
    Posts:
    1,370
    LOD means Level Of Detail. It refers to using several versions of an object that all look the same from far away but have varying levels of detail up close. The low detail versions are used when the object is far away to allow larger worlds to be rendered fast.


    Sure, with Unity anything like that that you can imagine is possible. It just takes some knowledge of scripting and time. Take a look at the documentation on triggers as a starting point:

    http://unity3d.com/support/documentation/ScriptReference/30_search.html?q=trigger
     
  10. ravsters

    ravsters

    Joined:
    Jan 18, 2008
    Posts:
    30
    thanks a bunch for the help!