Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
[quote="Dreamwalker1986"]Basically I've used irrEdit and places IrrKlangSceneNodes in 3D space on the map, now my main question is, as I want to programmatically manipulate that sound, I need a way to get it by ID, but am not sure how to do it, I've tried this (were 50 represents the ID) but didn't work: [code=cpp] CIrrKlangSceneNode* vikingsound1 = new CIrrKlangSceneNode(engine, smgr->getRootSceneNode(), smgr, 50);[/code] As a previous example how I've got node details from an IRR file previously is: [code=cpp]scene::ISceneNode * viking1 = static_cast<scene::ISceneNode*>(smgr->getSceneNodeFromId(21));[/code][/quote] |
||||
|
Irrlicht doesn't load all scene nodes from the .irr files CopperCube produces. Sound scene nodes are not supported, because irrlicht doesn't support sound by default, unfortunately. I've written an irrklang scene node which you can download here: http://www.ambiera.com/irrklang/.... If you register the CIrrKlangSceneNodeFactory class which is included in there as well in irrlicht, then this extends irrlicht to also load sound scene nodes. The code is a few years old, so I'm not entirely sure if it works 100%, but quite a few people are using it, and I think it still does. Once the sound scene node is registered in irrlicht, also sound nodes get loaded from the file and you can access them as you wrote. |
|