好久没写了,有些东西做过都快忘了,赶紧记一下. 现在来实现一个简单的相机程序. 原文地址http://www.cnblogs.com/rossoneri/p/4246134.html 当然需要的话可以直接调用系统的camera程序,但自己实现会使用更自由. 呐,既然要用实现相机,那就需要先了解一下调用camera的类android.hardware.camera android.hardware.Camera The Camera class is used to set image captu…
固定相机跟随 这种相机有一个参考对象,它会保持与该参考对象固定的位置,跟随改参考对象发生移动 using UnityEngine; using System.Collections; public class CameraFlow : MonoBehaviour { public Transform target; private Vector3 offset; // Use this for initialization void Start() { offset = target.posit…
固定相机跟随 这种相机有一个参考对象,它会保持与该参考对象固定的位置,跟随改参考对象发生移动 using UnityEngine; using System.Collections; public class CameraFlow : MonoBehaviour { public Transform target; private Vector3 offset; // Use this for initialization void Start() { offset = target.posit…
先上代码 using System.Collections; using System.Collections.Generic; using UnityEngine; public class CameraFollow : MonoBehaviour { //摄像机与主角的直线距离 ; //横向角度 ; //纵向角度 / ; //目标物体 public GameObject target; //横向旋转速度 public float rotSpeed = 0.2f; //纵向旋转速度 publi…