Hi,
I am very new to particles and I was trying to find the answer in manual or forum threads, but I was not able to find it. My question is - is it possible to rotate particles?
I have a boat emitting particles behind during movement, but they always have the same rotation. I need them to rotate (either vertices or at least textures) according to the direction of the boat.
Is it possible?
Thank you very much.
[Solved] Rotating particles
-
- Gnome
- Posts: 368
- Joined: Tue Jan 06, 2009 1:12 pm
- x 43
[Solved] Rotating particles
Last edited by kubatp on Wed Apr 05, 2017 9:19 pm, edited 1 time in total.
-
- OGRE Expert User
- Posts: 1148
- Joined: Sat Jul 06, 2013 10:59 pm
- Location: Chile
- x 169
Re: Rotating particles
Hello, you need to use a rotation affector =)
I dont have script snippets at hand, but in case you need c++ code:
cheers
I dont have script snippets at hand, but in case you need c++ code:
Code: Select all
Ogre::RotationAffector* newRotator = (Ogre::RotationAffector*)myParticleSystem->addAffector("Rotator");
newRotator->setRotationSpeedRangeEnd( Ogre::Radian(somevalue) );
newRotator->setRotationSpeedRangeStart( Ogre::Radian(somevalue) );
-
- Gnome
- Posts: 368
- Joined: Tue Jan 06, 2009 1:12 pm
- x 43
Re: Rotating particles
Hi Xrgo, thank you for such a quick reply. I already read about Rotator affector here http://www.ogre3d.org/docs/manual/manua ... r-Affector , but this is more like a random rotation, isnt it?xrgo wrote:Hello, you need to use a rotation affector =)
Or you mean that with every rotation of the boat (sceneNode) I also have to set the rotation to the emittor in code?
There is no way how to tell the emittor something like "always rotate the particles the same as the scenenode is"?
-
- OGRE Expert User
- Posts: 1148
- Joined: Sat Jul 06, 2013 10:59 pm
- Location: Chile
- x 169
Re: Rotating particles
yes thats a random rotator.... you can use "local_space true" or in c++
with that the particles will follow the scenenode in every transform, that means it will also follow the movement, that's usually something you don't want. not sure if that's what you want to achieve
Code: Select all
myParticleSystem->setKeepParticlesInLocalSpace(true);
-
- Gnome
- Posts: 368
- Joined: Tue Jan 06, 2009 1:12 pm
- x 43
Re: Rotating particles
I already tried that. This is not what I want.xrgo wrote:with that the particles will follow the scenenode in every transform, that means it will also follow the movement, that's usually something you don't want. not sure if that's what you want to achieve
Thank you for your answer. I just wanted to know if there is a way how to achieve this in general without updating the values all the time.
Thank you very much Xrgo