Hi,
I'm just looking through the createRain method in sky.cpp
I'm trying to understanding it:
as I see it, createRain adds a number of particle emitters that are bound to the sky root node, this means that as the sky root is bound to the player, the rain/snow will move with the player.
Is there a way this could be changed to use the osgParticle::PrecipitationEffect?
Thanks
Rain/Snow VFX attached to camera.
Re: Rain/Snow VFX attached to camera.
Alternatively, instead of having the particle emitter bound to the skybox, spawn particles in a diameter around the player within the world.
I don't know how this would be done yet but for now I'm wondering if it would be possible to just randomly spawn a single particle 600 times a second in a diameter around the player.
As the player moves, the spawn area changes but the spawned particles continue on their path in the world space (not bound to skybox) until they timeout (which i think currently is 1 second).
This would essentially mean having 600 emitters around the player in the world space whenever a weather effect is occurring.
I don't know how this would be done yet but for now I'm wondering if it would be possible to just randomly spawn a single particle 600 times a second in a diameter around the player.
As the player moves, the spawn area changes but the spawned particles continue on their path in the world space (not bound to skybox) until they timeout (which i think currently is 1 second).
This would essentially mean having 600 emitters around the player in the world space whenever a weather effect is occurring.
- Thunderforge
- Posts: 503
- Joined: 06 Jun 2017, 05:57
Re: Rain/Snow VFX attached to camera.
I assume that you're asking about this as a possible solution to bug #2698?
(I don't know enough to answer definitively, just wanting to understand your goal with this).
(I don't know enough to answer definitively, just wanting to understand your goal with this).
Re: Rain/Snow VFX attached to camera.
Yea trying to come up with a solution.
It wouldn't be the same solution as Vanilla but would at least look better in the mean time imo!
It wouldn't be the same solution as Vanilla but would at least look better in the mean time imo!