quick question (accesing nods from irr file)

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Dreamwalker1986
Posts: 39
Joined: Tue Sep 10, 2013 2:37 pm

quick question (accesing nods from irr file)

Post by 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: Select all

 
CIrrKlangSceneNode* vikingsound1 = new CIrrKlangSceneNode(engine, smgr->getRootSceneNode(), smgr, 50);

As a previous example how I've got node details from an IRR file previously is:

Code: Select all

scene::ISceneNode * viking1 = static_cast<scene::ISceneNode*>(smgr->getSceneNodeFromId(21));
CuteAlien
Admin
Posts: 9933
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: quick question (accesing nods from irr file)

Post by CuteAlien »

With new you create a new Node, the second solution looks correct, what is the problem with it? (when you know it's a CIrrKlangSceneNode* you can cast it to that).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply