Code: Select all
ISceneNode *cuboo = smgr->addCubeSceneNode(10.0f,NULL,-1,core::vector3df(140,120,-40));
scene::ISceneNodeAnimator *animm = smgr->createCollisionResponseAnimator(WorldColisions, cuboo,core::vector3df(5,5,5), core::vector3df(0,-0.1f,0));
cuboo->addAnimator(animm);
ISceneNode *cubooo = smgr->addCubeSceneNode(10.0f,NULL,-1,core::vector3df(140,120,-40));
scene::ISceneNodeAnimator *animmm = smgr->createCollisionResponseAnimator(WorldColisions, cubooo,core::vector3df(5,5,5), core::vector3df(0,-0.1f,0));
cuboo->addAnimator(animmm);
- WorldColisions value:0x101b4794
- -irr::IReferenceCounted0 value: {DebugName=0x1008aac0 "AÃÌÌÌÌÌÌÌÌÌÌÌÌU‹ìQÇ@kÇ@<dýÇ@(ðîÇ@," ReferenceCounter=268503232 }
There are more values nested, but the Reference Counted is the one im focusing at
Here comes the problem, when i create a new Object in my game it must collide with the scenario, for this purpose i call this function:
Code: Select all
bool IrrWolforce::IrrEngineStrategy::AddSceneCollision( GameObject *node )
{
//////////// MY ENGINE RELATED STUFF
// get IrrGameObjectImpl to give access to ISceneNode
// ONLY DO THIS KIND OF THING (get members exclusive from irrlitch) INSIDE IRRWOLFORCE!
ISceneNode * irr_node = ((IrrGameObjectImpl*)node->getImplementor())->node;
/////////////////////////////////////////////////////////////////////////////
scene::ISceneNodeAnimator *anim = smgr->createCollisionResponseAnimator(WorldColisions, irr_node,core::vector3df(5,5,5),core::vector3df(0,-0.5,0));
irr_node->addAnimator(anim);
return true;
}WorldColisions value: 0x002f7410
-irr::IReferenceCounted value: {DebugName=0x00000000 <Bad Ptr> ReferenceCounter=5 }
My object keeps the gravity but does'nt collide with anything...