Hi I’m from Korea, 16 years old
I’m building cardboard app
I want to add camera movement
but I don’t know how to create source because this is my first project.
Plz help me and create source
Thanks[53082-제목-없음-21.jpg|53082]
@JJhuk
Hi, I am from mexico. You are encountering problems because you are challenging yourself TOO hard for a project (first time). My first project was not even a game. It was a cookie clicker application. Actually my first project was pong game. It was something like this: http://www.ponggame.org.
I dont recommend doing such a large project.
But here is what i could think of:
-
Create a new c# script.
-
Type in this code:
public float speed = 12.5f;
void Update() {
if (Input.GetKey(KeyCode.W))
{
transform.position += Vector3.forward ** speed * Time.fixedDeltaTime;
}if (Input.GetKey(KeyCode.S)) { transform.position += Vector3.back * speed * Time.fixedDeltaTime; } if (Input.GetKey(KeyCode.A)) { transform.position += Vector3.left * speed * Time.fixedDeltaTime; } if (Input.GetKey(KeyCode.D)) { transform.position += Vector3.right * speed * Time.fixedDeltaTime; } if (Input.GetKey(KeyCode.UpArrow) { transform.position += Vector3.up * speed * Time.fixedDeltaTime; } if (Input.GetKey(KeyCode.DownArrow)) { transform.position += Vector3.down * speed * Time.fixedDeltaTime; }}
-
Drag the script and place it into the camera object.
-
Enjoy!
Sorry for the 1 year long reply.
To use it, press play then use WASD keys to move around.
Use UpArrow and DownArrow Keys To move up and down. Sorry but i cant find the way to
rotate you. Have a nice life.