Game Development Community

GuiObjectView enhancements

by Fyodor -bank- Osokin · in Torque Game Engine · 07/13/2006 (2:29 pm) · 4 replies

In our project we have ability to change cloth/armor for player in game, so using guiObjectView with "custom meshes", implemented multi-skinning for meshes... everything works fine, but...

I'm stuck on the following:

When user clicks on guiObjectView I need to know the exact mesh where cursor is located.

Any ideas on how to implement it? I know that I need to use rayCast , but here is my lack of knowledge of c++/torque..

#1
07/13/2006 (2:41 pm)
I have implemented object picking using resources found on the site here, but what you are asking for is polygon picking. That could be significantly harder to implement.
#2
07/13/2006 (2:44 pm)
Yeah.. actualy it's "mesh" picking.
First, you click on object, then - find out clicked polygon/mesh. After that I can get the name of mesh (or index in a model, this doesnt matter)..
#3
07/13/2006 (3:03 pm)
When I was debugging today I was seeing quite a lot of valuable data in the Auto window that gets stored in the rinfo structure or related structures, like Collision. These are all visible to the compiler, but you might have to create some accessor methods to get to things. I remember seeing a mesh/node collection in there, along with the face index of what was clicked on, full details about the object, etc.
#4
07/13/2006 (3:22 pm)
Dave - Nice. I'll have to remember that if I ever have to do poly picking.