hi
call someone tell me if this is possible and point the way please
getSceneNodeMaterialFromScreenCoordinatesBB
for a project that i am developing it would be nice if i can get the material layer from a node by clicking on it
so i could change its propertie if the material is green i would like to change it to blue but i need to know the exact layer. because the node can have textures or others materials.
thanks in advance for any help
getSceneNodeMaterialFromScreenCoordinatesBB
Re: getSceneNodeMaterialFromScreenCoordinatesBB
I don't think there is any easy way to do that. You can get the triangle and the node involved in a collision, from there on you are on your own. For similar checks I often use invisible nodes which are just used for collision.
I think what we would need would be a way to create ITriangleSelector's for single meshbuffers. That is unfortunately not yet supported by Irrlicht. So this would need some new kind of ITriangleSelector. In case anyone wants to code this - I guess it would be a nice addition to the engine.
Or we would need a way to access material again, but not sure right now if that is easy to add. Maybe the selectors could buffer it somehow? Didn't think about that yet.
I think what we would need would be a way to create ITriangleSelector's for single meshbuffers. That is unfortunately not yet supported by Irrlicht. So this would need some new kind of ITriangleSelector. In case anyone wants to code this - I guess it would be a nice addition to the engine.
Or we would need a way to access material again, but not sure right now if that is easy to add. Maybe the selectors could buffer it somehow? Didn't think about that yet.
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm