Assigning a different texture based on picking(XNA)

Posted by Thomas Carmichael on Game Development See other posts from Game Development or by Thomas Carmichael
Published on 2012-12-12T23:19:38Z Indexed on 2012/12/12 23:21 UTC
Read the original article Hit count: 207

Filed under:
|
|

I'm making a game using XNA. I have some simple objects like cube and sphere, and I would like to change the texture of one face of these objects based on picking. That is, when the cursor is over one face, it turns red. The only way I've seen to do this is to overload the content processor as here: http://xbox.create.msdn.com/en-US/education/catalog/sample/picking_triangle

but it seems like it shouldn't be this complicated. I'm using .x models, and would like to be able to implement this for more complex models in the future beyond cubes/spheres/etc. Is this the best/only way to go about it? I'll figure that out if that's what is necessary, but it seems that there would be a simpler solution to load a different texture to a face than I've seen, I just don't know what it is.

© Game Development or respective owner

Related posts about XNA

Related posts about textures