Collision objects do not follow SceneNodes?

Samapico

23-01-2013 16:38:06

I have a scene, with various scene nodes, and I attach collision objects to it. They are OgreBulletCollisions::Object, not rigid bodies, as I'm not using a Dynamics world, just a static one. However, I want to be able to move my scene nodes around, and I'd expect the collision objects to follow the nodes, since they are attached to them?
From what I understand, the bullet object's transform need to be changed. But in my implementation, when I move scene nodes around, I don't know what these scene nodes contain, so I can't really make specific checks for bullet objects and do something specific with them.

Right now, when I move my scene nodes, the debug shape follows my entities, but if I cast rays in the world, they collide with the object where it was before the move...

Is there any way to work around this?

Edit: Be aware that I am still mostly a beginner with all things Ogre/bullet... Maybe there's an obvious solution that I don't see. I'm looking at OgreBulletCollisionsObject.h and OgreMovableObject.h, trying to see if I could make my own objets inherit and have them do a little something... Not sure what :P. I see listeners, could I do something with them? Perhaps set a listener on the root node of my object, so that when the node moves, it makes the bullet object move in the collisions world?

Edit2: It is kind of counter-intuitive to have methods like OgreBulletCollisions::Object::setPosition(x,y,z) that move the scene node, yet do not seem to move the btCollisionObject...