HomeHome  CalendarCalendar  FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  Log inLog in  

Share | 
 

 disable/enable/hide particle system

View previous topic View next topic Go down 
AuthorMessage
mmortall



Messages : 6
Date d'inscription : 2011-04-11

PostSubject: disable/enable/hide particle system   Tue Apr 12, 2011 5:38 am

I need to disable/enable/hide/unhide particle system at any time.
How can I do that?
Back to top Go down
View user profile
takezo02



Messages : 10
Date d'inscription : 2010-11-23

PostSubject: Re: disable/enable/hide particle system   Thu Apr 14, 2011 5:44 am

I think you can to do this with this method in Core/SPK_Renderer.h

void setActive(bool active);

Apply to all renderer that you want enable/disable in any system or group.

Else implement a new bool or mask in order to enable/disable the render of system.
Back to top Go down
View user profile
Darktib
Committer


Messages : 389
Date d'inscription : 2009-07-20
Localisation : A coté de Paris

PostSubject: Re: disable/enable/hide particle system   Thu Apr 14, 2011 12:14 pm

If you are rendering and updating manually:
Code:
// In your app loop:
    if(systemIsEnabled) system->update(deltaT);
    if(systemIsVisible) system->render();

If you're using Irrlicht:
Code:
    SPK::IRRSystem* system;

    // ...

// Anywere you want
    system->setVisible(v); // v = false to hide it, true to show it
    system->setAutoUpdateEnabled(aue); // aue = false to disable, true to enable the system

@takezo02: Calling setActive on a renderer will only activate/deactivate a specific renderer, and that is useful if you want to disable only some parts of your system. I think mmortall asked for a solution hiding/showing the whole system...
Back to top Go down
View user profile
mmortall



Messages : 6
Date d'inscription : 2011-04-11

PostSubject: Re: disable/enable/hide particle system   Fri Apr 15, 2011 6:38 am

Thank your very mach for your help. My mistake was in using System class (no IRRSystem).
Back to top Go down
View user profile
Darktib
Committer


Messages : 389
Date d'inscription : 2009-07-20
Localisation : A coté de Paris

PostSubject: Re: disable/enable/hide particle system   Fri Apr 15, 2011 1:18 pm

You're welcome!

Btw, the first solution I wrote is only requiring SPK::System Wink
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: disable/enable/hide particle system   Today at 3:41 am

Back to top Go down
 
disable/enable/hide particle system
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Tracking Wiz - To Disable / Enable Windows 10 Tracking
» [SOLVED] Enable Apps to Work with UAC Disable
» [IMPLEMENTED] Registry tweak to disable File System Tunneling
» How to disable Remote Control page popping up?
» [ANSWERED] How to remove/disable Windows 10 preview Keylogger?

Permissions in this forum:You cannot reply to topics in this forum
 :: English Forum :: Questions (en)-
Jump to: