its kinda the follow up of this topic http://irrlicht.sourceforge.net/forum/v ... =1&t=47331
i use my class like that in my main.cpp:
Code: Select all
//ragdoll test
scene::ImyRagdollSceneNode*playerNode = new scene::ImyRagdollSceneNode(
core::vector3df (0.0f,0.0f,0.0f), //ragdoll position
core::vector3df (0.0f,0.0f,0.0f), //ragdoll rotation
0, //ragdoll state, animation
0, //ragdoll ID
smgr, //pointer
0, //parent node
-1); //ID
so i create a cube in my class.cpp constructor so when i use the class it render a cube in irrlicht.
i think it worked but i wasnt seeing anything so i just though about adding a texture to my cube so i can see if it work at all :
in myclass.cpp
Code: Select all
//albator
ImyRagdollSceneNode::ImyRagdollSceneNode
(
core::vector3df IragPosition, //ragdoll position
core::vector3df IragRotation, //ragdoll rotation
u32 IragState, //ragdoll state, animation
u32 IragID, //ragdoll ID
ISceneManager* smgr, //pointer
ISceneNode* parent, //parent node
s32 id //ID
): ISceneNode(smgr->getRootSceneNode(), smgr, id)
{
//init
ragPosition=IragPosition;
ragRotation=IragRotation;
ragState=IragState;
ragID=IragID;
IMeshSceneNode*torso=smgr->addCubeSceneNode(30.0f,0,torsoID,torsoPos,torsoRot,core::vector3df(1.0f,1.0f,1.0f));
torso->setMaterialTexture(0,driver->getTexture("texture/white.jpg")); //driver is undefined
}
could you tell me how to do that ?