Detecting pick for part of a 3d model

Blitz3D Forums/Blitz3D Programming/Detecting pick for part of a 3d model

KiwiSteve(Posted 2004) [#1]
I have reached a point in my current game where the user is asked to click specific limbs/areas of the game character. I know that I can use the EntityPickMode etc to determine if the model is clicked on, but is it possible to determine which of the groups within the model has been selected?

The model was created in Milkshape and has groups for each of the main parts: left leg, right leg, etc. Am I able to do what I'm trying to as the model is at the moment, or am I going to have to save each group out as individual models and import each one into a different entity in Blitz, and then parenting or repositioning each entity to remake the whole visually?

I hope someone can make some sense out of this.


DJWoodgate(Posted 2004) [#2]
If they are on different surfaces then pickedsurface might help, though you will have to get around the problem of identitfying the surface as blitz may load them in any order. Not so much of a problem with the new brush functions though.

It may be if you load as an animmesh those groups actually will equate to separate entities in a hierarchy and the entityname will identitfy the components. I Don't use Milkshape so I can not say for sure. Try it and see.


KiwiSteve(Posted 2004) [#3]
Thanks for that. I ran some code from the archive that loaded as aninmesh and then returned each of the children, and it did just what you thought. Each of the groups is classed as a child and as such can be returned as an entity handle. I'll have a further play around, but hopefully that should be it. Cheers.