摄像机摇移跟随
来源:互联网 发布:tensorflow tutorial 编辑:程序博客网 时间:2024/05/17 07:50
public float distanceAway; // distance from the back of the craft public float distanceUp; // distance above the craft public float smooth; // how smooth the camera movement is GameObject hovercraft; // to store the hovercraft Vector3 targetPosition; // the position the camera is trying to be in Transform follow; void Start () { follow = GameObject.FindWithTag ("Player").transform; } void LateUpdate () { // setting the target position to be the correct offset from the hovercraft targetPosition = follow.position + Vector3.up * distanceUp + follow.forward * distanceAway; // making a smooth transition between it's current position and the position it wants to be in transform.position = Vector3.Lerp (transform.position, targetPosition, Time.deltaTime * smooth); // make sure the camera is looking the right way! transform.LookAt (follow); }
Vector3 offset; Transform fly; // Use this for initialization void Start () { fly = GameObject .FindGameObjectWithTag ("Player").transform ; offset = fly .position - transform .position; } // Update is called once per frame void Update () { transform .position = new Vector3 (fly .position .x -offset .x ,transform .position.y ,fly .position .z -offset .z) ; }
0 0
- 摄像机摇移跟随
- 摄像机跟随人拍照
- unity3D 摄像机跟随
- Unity3D 摄像机滑动跟随
- 摄像机跟随问题
- u3d摄像机跟随
- Unity3D摄像机跟随人物
- unity3d摄像机跟随物体
- unit3d摄像机跟随角色
- 摄像机平滑跟随
- 摄像机的跟随
- 第三人称摄像机跟随
- 一种摄像机跟随方式
- Unity 摄像机平滑跟随
- 摄像机跟随主角
- Unity3D摄像机跟随人物
- Unity摄像机跟随Player
- 摄像机跟随,碰撞缩进
- gvim安装和配置
- ApkProvisionException问题解决
- 观察者模式
- Linux下进程描述(1)—进程控制块
- PHP socket服务器框架Workerman (GatewayWorker)
- 摄像机摇移跟随
- Redis安装
- 小强ROS机器人教程(17)___利用ORB_SLAM2建立环境三维模型
- Java反射详解
- C++中的继承(3)作用域与重定义,赋值兼容规则
- tensorflow函数--softmax_cross_entropy_with_logits
- BZOJ 1179: [Apio2009]Atm
- (c语言)结构体方法,计算该日是当年的第几天
- 建立HashSet的实例,依次填入三个名字判断实例中是否存在"Kobe"