SimpleScenes Error

Teknoman117

26-04-2010 07:38:40

Whenever I use the helicopter in the SimpleScenes demo, when I try to shoot the boxes, I get this error:

Demo_SimpleScenes: /home/robotdude/Downloads/ogre/ogreaddons/ogreode/demos/SimpleScenes/include/SimpleScenes_Crash.h:533: virtual bool SimpleScenes_Crash::collision(OgreOde::Contact*): Assertion `affectedGeom' failed.
Aborted
robotdude@XtremePC:~/Downloads/ogre/ogreaddons/ogreode/build/bin$

I am trying to make a shooting game and I probably need what is failing here. Can anyone give me some pointers?

dermont

27-04-2010 13:34:07

Try updating SimpleScenes_Crash.h

Index: demos/SimpleScenes/include/SimpleScenes_Crash.h
===================================================================
--- demos/SimpleScenes/include/SimpleScenes_Crash.h (revision 2837)
+++ demos/SimpleScenes/include/SimpleScenes_Crash.h (working copy)
@@ -516,15 +516,15 @@
const String typeInfo = String(a.getType ().name());

OgreOde::Geometry *affectedGeom = 0;
- if (a.getType() == typeid(OgreOde::BoxGeometry))
+ if (a.getType() == typeid(OgreOde::BoxGeometry*))
{
affectedGeom = (OgreOde::Geometry *) any_cast <OgreOde::BoxGeometry *> (a);
}
- else if (a.getType() == typeid(OgreOde::TransformGeometry))
+ else if (a.getType() == typeid(OgreOde::TransformGeometry*))
{
affectedGeom = (OgreOde::Geometry *) any_cast <OgreOde::TransformGeometry *> (a);
}
- else if (a.getType() == typeid(OgreOde::Geometry))
+ else if (a.getType() == typeid(OgreOde::Geometry*))
{
affectedGeom = any_cast <OgreOde::Geometry *> (a);
}

Teknoman117

21-05-2010 05:58:38

Thank you. That worked. Now I can continue. Sorry for the late post, I had some other things I had to deal with. I had to introduce many of the other features to my coding buddies in charge of the other system ports of our project. We are aiming to deploy and Sci-Fi real time strategy game to Mac, Linux/Unix, Window, and possibly the iPhone/iPad if we get around to compiling Ogre and ODE for it. The cross platform parts makes it easier but there are a few bugs still. Also some tools are different on the different systems.