IParticleSystemSceneNode.

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Cleves
Posts: 224
Joined: Mon Sep 08, 2003 6:40 pm

IParticleSystemSceneNode.

Post by Cleves »

I have created IParticleSystemSceneNode.
but after i used it i want to drop it.But i can't drop it so how can i stop it from existing?
Conner
Posts: 4
Joined: Fri Oct 10, 2003 2:40 pm

Post by Conner »

I'm not positive, but it seems like this may be what you need. You can check out the use in tech demo source:

virtual ISceneNodeAnimator* irr::scene::ISceneManager::createDeleteAnimator ( u32 timeMs ) [pure virtual]

Creates a scene node animator, which deletes the scene node after some time automaticly.

Parameters:
when: Time in milliseconds, after when the node will be deleted.

Returns:
Returns the animator. Attach it to a scene node with ISceneNode::addAnimator() and the animator will animate it. If you no longer need the animator, you should call ISceneNodeAnimator::drop(). See IUnknown::drop() for more information.
- Conner
Cleves
Posts: 224
Joined: Mon Sep 08, 2003 6:40 pm

Post by Cleves »

The problem is that i don't need to eliminate the node after some time but after a button isn't pressed.
There got to be another way... :?
Gorgon Zola
Posts: 118
Joined: Thu Sep 18, 2003 10:05 pm
Location: switzerland

Post by Gorgon Zola »

Cleves, you could try 'scenenode->remove()'

cheers
gorgon
Cleves
Posts: 224
Joined: Mon Sep 08, 2003 6:40 pm

Post by Cleves »

So simple but it works :D
But...If the ship accelerates and the button is not pressed(that means that the nodes are removed) the nodes still remain..maybe bug but i'm not sure yet i'll do more testing 8)

Thanks Gorgon
Gorgon Zola
Posts: 118
Joined: Thu Sep 18, 2003 10:05 pm
Location: switzerland

Post by Gorgon Zola »

i think you try to make something like an afterburner :D or so, which lights when you accelerate? why don't you trigger the visibility of the particle node with your key e.g. node->setVisible(...)' or something like that?
:wink:
Cleves
Posts: 224
Joined: Mon Sep 08, 2003 6:40 pm

Post by Cleves »

Yes, you guessed what i wanted to do and the setVisible idea worked great! :D
Thanks Zola
Post Reply