Free Look Camera in unity easy tutorial

Subscribers:
1,110
Published on ● Video Link: https://www.youtube.com/watch?v=kOF0S-FFcBc



Category:
Tutorial
Duration: 1:47
240 views
8


in this video i have shown how to develop free look camera in unity3d
Code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class FreeLookcam : MonoBehaviour
{

public Vector3 speed;
float xRot, yRot;
// Start is called before the first frame update
void Start()
{

}

// Update is called once per frame
void Update()
{

xRot += Input.GetAxis("Mouse X") * Time.deltaTime*speed.x;
yRot -= Input.GetAxis("Mouse Y") * Time.deltaTime*speed.y;

transform.localEulerAngles = new Vector3(yRot,xRot,0f);
}
}







Tags:
unity
unity3d
leran unity
unity tutorials
free look camera in unity
unity camera
unity coding easy