- 最后登录
- 2019-12-2
- 注册时间
- 2012-8-25
- 阅读权限
- 90
- 积分
- 34660
- 纳金币
- 38266
- 精华
- 111
|
unity摄像机左右颠倒的画面- using UnityEngine;
-
- using System.Collections;
-
- public class MirrorCamera : MonoBehaviour {
-
- // Use this for initialization
-
- void Start () {
-
- MirrorFlipCamera(Camera.main);
-
- }
-
- void MirrorFlipCamera(Camera camera) {
-
- Matrix4x4 mat = camera.projectionMatrix;
-
- mat *= Matrix4x4.Scale(new Vector3(-1, 1, 1));
-
- camera.projectionMatrix = mat;
-
- }
-
- // Update is called once per frame
-
- void Update () {
-
- }
-
- }
复制代码 |
|