【发布时间】:2022-06-10 23:24:45
【问题描述】:
我(再次!)询问 Ursina 的问题...
我知道 Ursina 有一个 scene.fog,我有点假设它是用于 3D 游戏的。我想在我的游戏中添加雾,但是设置 scene.fog_density 和 scene.fog_color 没有任何作用。
我做错了吗?如何在我的游戏中添加雾?
我正在使用(大部分)默认的 FirstPersonController
我的代码:
app = Ursina(development_mode=False, show_ursina_splash_screen=True,fullscreen=True,title="Maze FPS")
random.seed(0)
### SHADERS ###
Entity.default_shader = lit_with_shadows_shader
scene.fog_density = .1
scene.fog_color = color.red
我尝试了各种雾密度(0.1、1 和 3)和颜色(color.black、color.red、color.green)。 afaik 它没有任何效果
【问题讨论】:
-
请展示你做了什么。否则很难说你做错了什么。
-
@pokepetter,啊,你是对的。不知道为什么我没有想到。对不起!我已经添加了相关代码。