Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
Viewport¶
Inherited By: SubViewport, Window
视口的抽象基类。对绘图以及与游戏世界的交互进行了封装。
Description¶
Viewport(视口)会在屏幕中创建不同的视图,或是在其他视口中创建子视图。视口上会显示 2D 子节点,也会渲染 Camera3D 3D 子节点。
视口也可以拥有自己的 2D 或 3D 世界,这样就不会与其他视口共享绘制的内容。
视口也可以选择作为音频监听器,这样就可以根据 2D 或 3D 相机子节点生成位置音频。
另外,在设备有多个屏幕的情况下,可以将视口分配给不同的屏幕。
最后,视口也可以充当渲染目标,在这种情况下,除非使用与其相关联的纹理进行绘制,否则它们将不可见。
Tutorials¶
Properties¶
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||