bevy_atmosphere
bevy_atmosphere copied to clipboard
Add "up" direction in settings
I'm using Z-up in an application, so using this plugin results in everything being rotated 90 degrees. Being able to set the up vector would be handy.
Assuming you are using the Nishita model, that can be done by setting the ray_origin to (0.0, 0.0, 1.0). Of course, that is a model-dependent method and issue #39 addresses the need to have a way to add manual rotation.
@JonahPlusPlus I have a question about "ray_origin". I'm playing with making the directional light come from the right place for the time of day at a given latitude. For the sky to match, should ray_origin be set to the zenith?
@mattdm I'm not really sure what your use case is, but if you are trying to rotate the sky independent of the camera, then yes, the ray_origin can do this, you just set it to the direction that is "up", the zenith as you say. Though, you might want to look into just rotating the sky mesh (IDK if that can be done, others have been maintaining the project in my absence) since that is not as computationally expensive (but if you are changing other parameters as well, it doesn't matter).
Use case is simply simulating sunlight and sun-position at non-equitorial latitudes. Changing sun_position seems to align the sky nicely — but I'm not sure what this parameter does for the model, and want to make sure I'm not missing something.