Game Development Community

New inheritance

by Nathan Bowhay - ESAL · in Torque Game Engine · 10/06/2008 (1:46 pm) · 0 replies

So this may be kind of odd, but we are implementing an inheritance system like you would find in maya in torque.

So when you call getPosition it will get a position relative to the parent. Scale will work like it does in maya as well, and same with rotation. Also when you select a parent it will select all the children. We are working out the details on how we are going about this, but it shouldn't be an issue. The thing we noticed is that guiControl works the same way and just has a group of objects because it inherits from SimGroup. Also it already has it set up for saving and loading the inheritance. So we decided to make NetObject inherit from SimGroup instead of SimObject. We talk about using mounting, but then would would have to figure out how to handle saving and loading and would have to move it up a class anyway.

Anyway I wanted to make sure and give some background of what we are doing before I ask my question.

The only problem thus far we ran into is in sceneObject.cc under the Container dtor the warning about an object created not removing itself before the container was destroyed. This happens when TGE is closed. To try and get further with our work we commented out the warnf so it wouldn't crash.

The comment states it's generally benign, but for things other than particles (which we didn't have any when it happened) it is a bad sign.

So my question is what other bad things can occur because of this? When exiting torque is there some place in which objects normally get removed from the container? Any help on coming up with why this is happening or how to solve it would be great. I would hate to leave something like this commented out and then later down the road run into a huge issue.

Thank you for any help.