bevy_atmosphere icon indicating copy to clipboard operation
bevy_atmosphere copied to clipboard

Dark side of the moon

Open gilescope opened this issue 3 years ago • 1 comments

Would be cool if we could create an example of lighting half the world but leaving the other half in darkness.

gilescope avatar May 28 '22 08:05 gilescope

You can do this by changing the ray_origin of AtmosphereMat. For example, changing swapping the Y and Z axis so it becomes (0, 0, 6372e3): Screenshot 2022-05-28 160055 This changes the plane the atmosphere rests on to be on the Z axis instead of the Y axis. It's not exactly cutting the world into two separate halves, but I find it hard to justify adding such a niche feature into the crate. If you need a certain aesthetic, it might be better to fork the crate and implement your own solution, such as creating a round cube in Blender and cutting it into two meshes and apply two separate AtmosphereMat to the meshes, one for day and night.

JonahPlusPlus avatar May 28 '22 20:05 JonahPlusPlus