游戏开发:相机匹配优化与物理特效资产添加
相机匹配测试与脚本优化
在游戏开发中,相机匹配是一个重要环节,它能让玩家更流畅地观看游戏中的动作。以下是具体的操作步骤:
1. 准备相机匹配测试
- 拖动目标花朵外观到其目标外观参数上。
- 在检查器中,将花朵对象的查找状态 1、元素 0 修改为: default,2,c0_Flower,2 。
- 打开 CameraMatch 脚本。
- 为所有顶部变量添加 internal :
internal var targetPos : Transform ; // destination position
internal var source : Transform ; // the position of the object the script is on, start pos
internal var targetLook : Transform; // camera's target for lookAt
internal var fPCamera : GameObject; // main camera
internal var duration : float = 1.0 ; // seconds duration of the camera match
- 保存脚本。
- 点击播放,测试 ChestLid 序列和花朵。虽然这两个对象能让玩家平滑进入观看动作的位置和正确方向,但仍存在一些问题,比如与
超级会员免费看
订阅专栏 解锁全文
1657

被折叠的 条评论
为什么被折叠?



