Hello,
I'm using irrEdit to define position of the 3D sounds of my game.
In the wiki, i found this great method to apply collisions to objects defined in the .irr file :
void CNewtonGame::recursiveFillMetaSelector(scene::ISceneNode* pNode)
{
printf ("Node name is: %s \n",pNode->getName());
printf ("Node id is: %d \n",pNode->getID());
printf ("Node type:");
// printf ("Node type: %s=",smgr->getSceneNodeTypeName());
if (pNode->getType() == ESNT_UNKNOWN) printf("Unknown mesh type \n\n");
else if (pNode->getType() == ESNT_MESH) printf("Standard Mesh \n\n");
else if (pNode->getType() == ESNT_ANIMATED_MESH) printf("Animated Mesh! \n\n");
else if (pNode->getType() == ESNT_SKY_BOX) printf("SkyBox! \n\n");
else if (pNode->getType() == ESNT_SKY_BOX) printf("SkyBox! \n\n");
else if (pNode->getType() == ESNT_CAMERA_FPS) printf("Fps Camera! \n\n");
else if (pNode->getType() == ESNT_CAMERA_MAYA ) printf("Maya Camera! \n\n");
else if (pNode->getType() == ESNT_CAMERA && strNodeName.equals_ignore_case(L"CameraMain"))
....
I have 2 questions :
1. Are 3D sounds played automatically when doing a loadScene("myLevel.irr) ???
2. if not, how can i get detect an IrrKlang scene node using something like ESNT_SKY_BOX (ESNT_IRRKLANG_SCENE_NODE doesn't seems to exist)
Thanks
Eviral
irrEdit and irrKlang Scene Node
You need to know the result of getType() when called on the CIrrKlangSceneNode. If you look at the irrKlang code provided by Niko, he uses...
Travis
Code: Select all
#ifdef MAKE_IRR_ID
const int IRRKLANG_SCENE_NODE_ID = MAKE_IRR_ID('i','k','n','g');
#else
const int IRRKLANG_SCENE_NODE_ID = 'ikng';
#endif // MAKE_IRR_ID
const int IRRKLANG_SCENE_NODE_ID = 'ikng';vitek wrote:TravisCode: Select all
#ifdef MAKE_IRR_ID const int IRRKLANG_SCENE_NODE_ID = MAKE_IRR_ID('i','k','n','g'); #else const int IRRKLANG_SCENE_NODE_ID = 'ikng'; #endif // MAKE_IRR_ID
what will go into IRRKLANG_SCENE_NODE_ID?