Game Development Community

RigidShape-derived object

by Daniel Buckmaster · in Torque Game Engine · 07/16/2007 (1:24 am) · 1 replies

I'll try to be brief. I've decided (some of my team have decided...) that for a custom object we're using, we'd like full physics. Wisdom of the decision aside, I changed it from a ShapeBase-derived class to one based on RigidShape (so it looks like 'class Pickup public RigidShape'). I removed all the methods that RigidShape already has, and added calls to Parent::function for ones that I needed to add more to (for example, being mounted in processTick).
Now, when I add one of my special objects to a mission, I get a popup that tells me that I'm adding an object that's already added - some problem in sim/sceneobject.cc. If I click retry, it sends me to a clal to break, and I'm none the wiser. If I cancel, Torque shuts down, and I'm also none the wiser.
Anyone got any idea what's going on?

About the author

Studying mechatronic engineering and computer science at the University of Sydney. Game development is probably my most time-consuming hobby!


#1
07/18/2007 (11:20 am)
Okay, this is solved. In Pickup::onAdd, I commented out the call to addToScene, and everything worked a treat. Odd, since Item does this with no problems. I guess there's a difference between inheriting from RigidShape and straight from ShapeBase. Meh.