alexnode
05-12-2006 23:24:49
Hi i am trying to insert an ambient sound in a project that loads osm scenes. The problem is that i cannot attach the sound to a scenenode because i don't know how oFusion is naming the scene nodes. Is there any example that i could use? I used the demo Oscene loader and i added the fmod .h and .ccp files. If i create entities , scenenodes etc directly everything works but when i try to do it from the Oscene loader i can't call any scene node. And what if i want to move an object in the scene? How i could point to a mesh and have some fun?
any suggestions? i thought that sceneNode could work ...but it doesn't
....// Here is the code that will load the scene file
// A fixed filename "scene.osm" is implemented for this demo
// Create the scene loader
OSMScene oScene;
// Create an oE_Loader Callback object to post-process created objects
oSceneCallback oe_Callback;
// Initialises with the scene to be loaded and the callback if requiered
oScene.initialise("scene.osm", &oe_Callback);
// create and setup the scene in the root node
oScene.createScene();
int soundBoogie;
soundBoogie = soundMgr->CreateSound(String("boogie.ogg"));
int channelBoogie;
soundMgr->PlaySound(soundBoogie, sceneNode£"$^£$% , &channelBoogie);
...
any suggestions? i thought that sceneNode could work ...but it doesn't