using System.Collections; using System.Collections.Generic; using UnityEngine; public class Player : MonoBehaviour { public GameObject CapsulePlayer, MainCamerahead; private float aixsX, aixsY, mouseScroll; private int moveSpeed; ; ; ; private float
camera的aspect默认是与screen保持一致,可以通过脚本将其设为指定值,如下: using UnityEngine;using System.Collections; public class makeCameraViewWequalsH : MonoBehaviour { // Use this for initialization void Start () { gameObject.GetComponent<Camera> ().aspect = 0.1f
这篇作为上一篇的补充介绍,主要讲Unity里面的投影矩阵的问题: 上篇的链接写给VR手游开发小白的教程:(三)UnityVR插件CardboardSDKForUnity解析(二) 关于Unity中的Camera,圣典里面对每一项属性都做了简要的介绍,没看过的小伙伴传送门在下面 http://www.ceeger.com/Components/class-Camera.html 一.裁剪面 先从这个专业的词汇开始,以下是圣典对裁剪面的介绍: The Near and Far Clip Plane