Hey everyone, I’m in a bit of a bind and I wanted to see if anyone could help me out or send some suggestions on what I should do. I’m currently working on a horizontal shmup space game and I’m having difficulty trying to get the main camera to move. What I’m trying to do is something similar to that of Gradius V. I’m trying to get the main camera to move inside a skybox. The camera would scroll from left to right like a flat scrolling background image, but within the skybox. Since I know that the I can’t animate the skybox, I figure move the camera instead, having it scroll across and even possibly curve slightly. Plus, I want it to lock the camera onto on to the player ship and let the ship move freely inside the scrolling boundaries.
Does anyone have any suggestions on how to approach this and how to script it in C#? Thanks in advance for any help and suggestions. They’re always appreciated and welcome.
you can use transform.position for camera move. If you want it to lock on ship, then easy script:
using UnityEngine;
using System.Collections;
public class Cam : MonoBehaviour {
//insert gameobject (your ship, or other move point)
public GameObject ship;
void Start () {
//move camera to ship on start
transform.position = new Vector3 (ship.transform.position.x, ship.transform.position.y, ship.transform.position.z);
}
void Update () {
//move camera on ship every frame
transform.position = new Vector3 (ship.transform.position.x, ship.transform.position.y, ship.transform.position.z);
}
}
i have never played Gradius, so i can not say what to do exactly 
It’s a classic PS2 game from the Gradius franchise. Here’s what I’m talking about with the scrolling 2.5D background I’m trying to mimic:
you can make moving point along path, lock camera on this point with script.
I think its not only one way to move point.
You can make pathnodes, then move with transform + lerp. Something like:
transform.position = new Vector3(Mathf.Lerp ( transform.position.x, node.transform.position.x, Time.deltaTime ), Mathf.Lerp ( transform.position.y, node.transform.position.y, Time.deltaTime ), Mathf.Lerp ( transform.position.z, node.transform.position.z, Time.deltaTime ));
or more easy with animator. Make empty point, add animator, create animator controller (then attach animator controller to animator), open animation window, click rec button, set time on timeline and make nodes in space for moving.
I am not so good at scripting, its only theory 
Cool, I’ll give it a shot. Thanks for the help.