MidnightCow Posted September 12, 2015 Share Posted September 12, 2015 Hi there, I'm literally brand new to WebGL and BabylonJS ( although already a programmer and 3d artist ), but having a lot of fun learning it, great job on the engine/api so far guys. What i'm trying to figure out, is if there is a way to discover the rgb texture value where the mouse has been clicked.. Having a look at PickingInfo, it looks as though getTextureCoordinates() might be used to read the position on a bitmap texture for example ( just wild theories at this point of course ), although i can see no way to access the rgb data of a bitmap or texture object anywhere in the Babylon API. Any idea if this might be possible? Basically what i'm trying to achieve is - i have an object, with a texture on it, and i would like the user to be able to click on different parts of the object to make stuff happen. So i was thinking, if the texture had say a blue area, the user clicks on the blue, it does something, they click on a red part, it does something else.. The other more obvious way i think to achieve this would be to either break the object up into separate clickable meshes and go from there, or have invisible hotspot meshes that detected clicks in specific areas.. But i just wanted to try and figure out if this would be possible. Texture hotspots based on colour would be a handy thing to have for general interactivity.. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.