using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MouseFollowRotation: MonoBehaviour {
public Transform target;
public float xSpeed = 200, ySpeed = 200, mSpeed = 10;
public float yMinLimit = -50, yMaxLimit = 50;
public float distance = 2, minDistance = 2, maxDistance = 30;
//bool needDamping = false;
public bool needDamping = true;
float damping = 5.0f;
public float x = 0.0f;
public float y = 0.0f;
public void SetTarget(GameObject go)
{
target = go.transform;
}
// Use this for initialization
void Start()
{
Vector3 angles = transform.eulerAngles;
x = angles.y;
y = angles.x;
}
// Update is called once per frame
void L