Search Unity

How can I make a look around effect of the player some kind of cutscene ?

Discussion in 'Timeline' started by dubiduboni_unity, May 29, 2019.

  1. dubiduboni_unity

    dubiduboni_unity

    Joined:
    Feb 11, 2019
    Posts:
    116
    I want that at some point in the game the player will be looking over the view out of the window.
    So I added a new Camera and positioned the camera close to the window.
    Then using a small script I'm turning the Camera on.

    But after turning the camera on I wan to make that the camera will rotate around the window area so it will give a natural feeling that the player is looking over the view outside.



    And the script that is attached to another GameObject that activating the Camera :

    Code (csharp):
    1.  
    2. using System.Collections;
    3. using System.Collections.Generic;
    4. using UnityEngine;
    5.  
    6. public class ItemAction : MonoBehaviour
    7. {
    8.     public Camera viewCamera;
    9.  
    10.     private void Update()
    11.     {
    12.        
    13.     }
    14.  
    15.     public void ViewCamera()
    16.     {
    17.         viewCamera.enabled = true;
    18.     }
    19. }
    20.  
    Ignore the ItemMove part.

    The part I'm using is the ViewCamera method.
    But I messed it up.
    But the idea is after turning on the Camera to make it feel like looking around the view outside.