• Camera


    Camera

    1、Camera属性如下    

      

      属性说明参考:file:///D:/Program%20Files%20(x86)/Unity/Editor/Data/Documentation/Documentation/Components/class-Camera.html

    2、Clear FLags可以选择Depth Only选项。

      If you wanted to draw a player's gun without letting it get clipped inside the environment, you would set one Camera at Depth 0 to draw the environment, and another Camera at Depth 1 to draw the weapon alone. The weapon Camera's Clear Flags should be set to to depth only. This will keep the graphical display of the environment on the screen, but discard all information about where each object exists in 3-D space. When the gun is drawn, the opaque parts will completely cover anything drawn, regardless of how close the gun is to the wall.

      Camera每帧会绘制图像,燕绘制图像前会清空color buffer、depth buffer。Depth only的意思就是只清除Depth Buffer。

    3、把Camera挂于一个GameObject层级下,则Camera会随着此GameObject运行,即可实现跟随效果。

    4、Cameras can be used in physics simulation if you add a Rigidbody Component. 

    5、Cameras cannot render to the Game Screen and a Render Texture at the same time, only one or the other.

    6、Unity comes with pre-installed Camera scripts, found in Components->Camera Control. Experiment with them to get a taste of what's possible.

    7、Camera的宽、高取决于实际场景窗口的宽高,例如在iOS设备上,屏幕的宽高将被应用于Camera。

    8、viewport决定camera拍出的视图在屏幕上的位置,使用的是规范化坐标0~1。

    参考:file:///D:/Program%20Files%20(x86)/Unity/Editor/Data/Documentation/Documentation/Components/class-Camera.html

  • 相关阅读:
    巧用table的rules属性设置表格的边框掩饰。。。
    JS日期和时间
    onchange事件验证文本框格式,不正确光标返回原文本框,这个js怎么写?
    简易万用表
    在单片机中的空函数
    地感线圈的讲究
    全桥片
    这个当单片机程序怎么会不停的通过串口发数据,设置波特率为9600,但是串口软件接受数据不对(初学者,请高手指教)
    今天开博
    关于二极管
  • 原文地址:https://www.cnblogs.com/tekkaman/p/3806297.html
Copyright © 2020-2023  润新知