Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Dynamic camera following/transition view

Discussion in 'Game Design' started by vanbandama, Jun 4, 2016.

  1. vanbandama

    vanbandama

    Joined:
    Jun 4, 2016
    Posts:
    1
    Hi. I'm new to unity engine at all. So this topic is for self-teaching purposes ;d

    I want to make run and gun game similar in style to those 2:
    Apocalypse:

    One:


    How to achieve camera movement while running just like in 1st stage in One or prison level in Apocalypse?

    Thanks for answers ;)
     
  2. DroidifyDevs

    DroidifyDevs

    Joined:
    Jun 24, 2015
    Posts:
    1,724
    You're going to have to do 2 things:
    1: Move the camera
    2: Rotate the camera

    So for 1, I'd recommend using something like this:
    Code (CSharp):
    1. this.transform.position = new Vector3(PlayerX, PlayerY+5, PlayerZ-10);
    . Then use
    Code (CSharp):
    1. this.transform.rotation
    to rotate the camera as you wish. You might wish to use triggers to detect when to rotate the camera.