噩梦5 camera跟随
来源:互联网 发布:php在线插件 编辑:程序博客网 时间:2024/04/29 03:38
namespace CompleteProject
{
public class CameraFollow : MonoBehaviour
{
public Transform target; // The position that that camera will be following.
public float smoothing = 5f; // The speed with which the camera will be following.
Vector3 offset; // The initial offset from the target.
void Start ()
{
// Calculate the initial offset.
offset = transform.position - target.position;
}
void FixedUpdate ()
{
// Create a postion the camera is aiming for based on the offset from the target.
Vector3 targetCamPos = target.position + offset;
// Smoothly interpolate between the camera's current position and it's target position.
transform.position = Vector3.Lerp (transform.position, targetCamPos, smoothing * Time.deltaTime);
}
}
}
- 噩梦5 camera跟随
- Unity3d 二维Camera跟随
- Unity)摄像机Camera跟随
- 噩梦射手 心得 移动旋转面向 摄像机跟随
- 噩梦5 敌人血量
- 噩梦
- 噩梦
- 噩梦
- 噩梦
- 噩梦
- 噩梦
- 噩梦
- Unity3D中Camera的跟随方案
- 噩梦系列篇之相机平滑跟随Player及Tag的设置
- Unity3D 处于Camera跟随游戏对象后面拍摄的方法
- Unity3D Camera跟随游戏对象后面拍摄的方法(二)
- unity camera随机点拍摄并能缓动跟随目标
- SURVIVAL SHOOTER TUTORIAL之Camera跟随角色移动 [4]
- opencv调试时出现的问题(一)
- C++第三节:二次删除、内存泄漏
- Navicat_V11.0.10 for Mysql(绿色免安装破解版)
- 1.IOS TableView滑动显示多个按钮
- Redis教程1--入门篇
- 噩梦5 camera跟随
- 树莓派ping主机名比IP地址慢的原因及解决方法
- Android5.0Button字体大小写
- 如何构建职场软实力
- objc_msgSend()报错Too many arguments to function call ,expected 0,have3
- 217.Contains Duplicate(判断一个数组是否有重复数出现)
- Tomcat乱码解决方法
- Windows 10: 命令行可以直接使用Ctrl+C和Ctrl+V了
- Scala中迭代器Iterator使用