Archived

This topic is now archived and is closed to further replies.

Scene Manager + Controllers.

This topic is 5018 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I want to add controllers to my scene manager. I have added a Controller list to the node class so I can attach controllers to the nodes (I think everyone is doing this this way). I have objects in the scene that have to be animated when time reaches a certain amount, this way, the animation for this object will start. For now I have a class called KeyAnimationController that has 3 vertex controllers that work over the position, rotation and scaling of the node. How would you manage in this system the trigger of animations for each object?, should each controller have a bActive member varible that is set by itself when time reaches the startTime for this animation?, some thing like this: Controller::Update(float ftime) { fTotalTime+=fTime; if(fTotalTime>=fStartTime) bActive=true; if(bActive) "Do whatever this controllers should do"; } I don´t like this way, but I couldn´t find anything better, could anybodoy bring some light to the subject?. Note: If anyone can point me to any site with information about how to build the scene manager system using controllers I will be really greatfull. Thanks in advance, HexDump.

Share this post


Link to post
Share on other sites
You could create a class for Controllers that require the start time/activation code, and include the code in that class''s update function. The class could then call a virtual method called, say, UpdateWhenActive(). That way you wouldn''t have to write the code every time, just inherit.

Share this post


Link to post
Share on other sites