Kinematic Body Detritus

zolver

17-12-2010 02:55:44

Dear all,
I tried to learn
http://www.ogre3d.org/tikiwiki/BloodyMess+Tutorial+5

with Nxogre Detritus. When I add kinameticBody like this tutorial
http://www.ogre3d.org/tikiwiki/BloodyMess+Tutorial+5#Extending_our_tutorial_class

Here, my KinematicBody that I added
mKB = mRenderSystem->createKinematicBody(NxOgre::BoxDescription(12,1,12), NxOgre::Vec3(0,12,0), "cube.1m.mesh", bodyDescription);
mRenderSystem->createBody(NxOgre::BoxDescription(1,1,1), NxOgre::Vec3(0,14,0), "cube.1m.mesh", bodyDescription);


I got error
1>c:\dev\projects\nxogre\rc1\rc1.cpp(121) : error C2440: '=' : cannot convert from 'Critter::KinematicBody *' to 'Critter::Body *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\dev\projects\nxogre\rc1\rc1.cpp(128) : error C2664: 'BloodyMessTutorial5Listener::BloodyMessTutorial5Listener(Ogre::RenderWindow *,Ogre::Camera *,Critter::RenderSystem *,Critter::KinematicBody *)' : cannot convert parameter 4 from 'Critter::Body *' to 'Critter::KinematicBody *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast


Any solution?
Thanks

betajaen

17-12-2010 08:43:00

You have mKB as a Critter::Body*, it should be a Critter::KinematicBody*

zolver

18-12-2010 05:52:46

OK,
Thanks Betajaen :D