HI,
I have loaded a collada file into my scene. It's a simple room with 4
walls and a floor, i need to add a mouse event to each wall of the
room, but i don't know if there's a way to add event listeners to the
materials (simple color materials) or the faces.
I have added a mouse event to the mesh and tried to use the 'material'
property but it returns a null value.
mesh= (loader.handle as ObjectContainer3D).children[0];
mesh.addEventListener(MouseEvent3D.MOUSE_DOWN, onClickObject);
private function onClickObject(e:MouseEvent3D){
trace(e.material); //this trace null.
}
how could i add an event listener to each of the materials or the
faces in my mesh?
Thanks for your help.
Alex.