Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Multiple Camera's or Change Camera's Transform position.

Discussion in 'Scripting' started by RoryScanlan, Aug 25, 2014.

  1. RoryScanlan

    RoryScanlan

    Joined:
    Jan 25, 2014
    Posts:
    139
    Pretty trivial question really just want some opinions, Im creating a game with 'racing like' camera angles with different camera shots on different corners.

    In your opion would it be better to have multple camera's and activate and deactivate them, or to have one camera and change the camera transform position?
     
  2. smitchell

    smitchell

    Joined:
    Mar 12, 2012
    Posts:
    702
    Definitely only have one camera and interpolate it's position, it'd look horrible if the camera just jumped from one position to another
     
  3. DarkArts-Studios

    DarkArts-Studios

    Joined:
    May 2, 2013
    Posts:
    389
    Personally I'd say use a single camera while actually driving (although Track Mania has had success with camera changes when you're doing odd things like a 360 degree loop) but don't toss out the idea of multiple cameras either, especially if you're planning on playing back replays. Racing games with "TV Like" camera views for replays rock.

    This is incredibly subjective though.
     
  4. TRG96

    TRG96

    Joined:
    Mar 26, 2011
    Posts:
    102
    I made a racing game and had a single camera and transform points where the camera would lerp to. Much nicer effect than just switching to another position instantly.
     
  5. RoryScanlan

    RoryScanlan

    Joined:
    Jan 25, 2014
    Posts:
    139
    Thanks for all the replies to change the subject abit does any one know why im getting this error with this script?
    Code (CSharp):
    1.  
    2.     void CreateCarList()
    3.     {
    4.         foreach(GameObject cars in GameObject.FindGameObjectsWithTag("AI"))
    5.         {
    6.             AIDriving aiDriving = cars.GetComponentInParent<AIDriving>();
    7.             int carNumber = aiDriving.CarNumber;
    8.             Cars.Insert(carNumber, cars);
    9.         }
    10.         ChooseCar ();
    11.     }
    12.  
    :(
     
    Last edited: Aug 25, 2014
  6. TRG96

    TRG96

    Joined:
    Mar 26, 2011
    Posts:
    102
    Check o make sure you have gameobjects with Tags "AI". Without looking at the rest of your code its hard t tell where the problem is, which line are you getting the error on?
     
  7. Fraconte

    Fraconte

    Joined:
    Dec 6, 2013
    Posts:
    327
    Try print (carNumber);