[SOLVED] Faster than the speed of rain


08-04-2009 00:25:52


I'm having a problem with Caelum's precipitation system. I am using the following precipitation init code:

m_lpCaelumSystem->setPrecipitationController(new Caelum::PrecipitationController(m_lpOgreSceneManager));

As you can see in the top image below, the rain appears as normal (and is quite nice, too :)). However, when I attempt to move my avatar in a given direction, the rain begins 'falling' in that direction, as per the bottom image.

I am not doing anything special with the camera at present; when the avatar is moved, I calculate the movement vector, and set the camera's position, offset by a fixed amount to give the camera a third-person viewpoint. The camera also uses lookAt() to observe the avatar's node.

What am I doing wrong?


I tried tinkering with the precipitation in the CaelumLab, and it seems to be exhibiting the same anomaly I noted in my own game. I placed the camera high up, facing -Y. When moving backward, rain speeds up, direction changes a little but not greatly. When I move forward, the rain suddenly acts as though it is 'falling' along the Z axis.


09-04-2009 19:25:01

When moving through rain drops should no longer seem to fall "straight down". There are a bunch of methods on Caelum::PrecipitationController to control exactly what happens. If you don't like this behaviour or can't get it to work correctly you can just setManualCameraSpeed(Ogre::Vector3::ZERO); and the effect should go away.


09-04-2009 20:36:22

setManualCameraSpeed(Ogre::Vector3::ZERO) is exactly what I needed. Thanks!


26-06-2009 19:18:31

I have the exat same problem in caelum (actually the .NET port but nevertheless exactly the same):

- The issue is:
this.cs.PrecipitationController = new PrecipitationController(sceneMgr);
//this.cs.PrecipitationController.CreateViewportInstance(cs.get); //I do not pass an viewport because it already is attached to caelum and renders correctly the rain
this.cs.PrecipitationController.PresetType = CaelumSharp.PrecipitationType.Rain;
this.cs.PrecipitationController.Intensity = 0.8f;
this.cs.PrecipitationController.Speed = 0.01f;

As you can see, the SetManualCameraSpeed(Mogre.Vector3.ZERO) solution did not work for me because the avatar is not moving.
I'm simply trying to build the CaelumDemo in a way that i can get raining effect with a precipitation controler and navigate normally trhough the scene but the movement is altering the Raindirection and not the camera movement as it should.

Its probably simple to solve this, but I'm trying and getting a tough time at it.

I also checked the Mogre.SceneManager.cameraIterator to see if there were any extra cameras created by the precipitation system, but its just the regular ones (user + shadows) as we can see on the screenshots:

As you can see the cameras are the same.

Any help?
Thanks for the time spend in reading this :D