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

Camera turning with player (UNANSWERED)

Discussion in 'Scripting' started by Ryuso_, Apr 26, 2020.

  1. Ryuso_

    Ryuso_

    Joined:
    Nov 30, 2019
    Posts:
    9
    I am making a game utilizing portals, but right now I have a static camera for looking through the portals. I would like the camera to turn with the player to allow different perspectives but can't figure out how. Any help would be appreciated!

    Edit: I made the portals following this youtube tutorial:

     
    Last edited: Apr 26, 2020
  2. Yoreki

    Yoreki

    Joined:
    Apr 10, 2019
    Posts:
    2,590


    Here you go.
     
  3. Ryuso_

    Ryuso_

    Joined:
    Nov 30, 2019
    Posts:
    9
    Thank you, I will take a look now, thanks again!
     
  4. Ryuso_

    Ryuso_

    Joined:
    Nov 30, 2019
    Posts:
    9
    It is complicated and I can't figure out how to implement it, do you know of any other simpler methods
     
  5. Yoreki

    Yoreki

    Joined:
    Apr 10, 2019
    Posts:
    2,590
    Portals are not exactly simple, and get complicated the more features you require. Making light go through portals for example (which is not featured in the above tutorial), is a nightmare. But other than that he really explains well what goes into creating some of the important effects for portals in the video. He also provides all of the source code.
     
    matkoniecz likes this.
  6. Ryuso_

    Ryuso_

    Joined:
    Nov 30, 2019
    Posts:
    9
    I did try to use the project file, but, it failed to load up any of the scenes, and prefabs wouldn't work, but thanks again anyway!
     
  7. Yoreki

    Yoreki

    Joined:
    Apr 10, 2019
    Posts:
    2,590
    What do you mean with 'failed'? Was there an error? Maybe you used a too old or too new version of Unity?