getSceneNodeMaterialFromScreenCoordinatesBB

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Ghus
Posts: 13
Joined: Wed May 12, 2010 5:42 pm

getSceneNodeMaterialFromScreenCoordinatesBB

Post by Ghus »

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
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: getSceneNodeMaterialFromScreenCoordinatesBB

Post by CuteAlien »

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.
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