How to get the bone a vertex is assigned to ?

Blitz3D Forums/Blitz3D Programming/How to get the bone a vertex is assigned to ?

jfk EO-11110(Posted 2007) [#1]
How do I get the pivot (or bone) a vertex is assigned to ?

I'm trying to fix the problem with decals on animated meshes, if you parent them to the ani mesh handle, they ignore tha animation. Probably this can be fixed, at least partially, if they are parented to a certain bone of the animesh. So I needed to get the bone handle of the picked triangle. Is there a way?


Matty(Posted 2007) [#2]
I'm tempted to say that with the standard blitz commands you cannot determine which bone(pivot) is connected to a vertex. I may be wrong but I think that is the case.


jfk EO-11110(Posted 2007) [#3]
I was afraid of that. But probably it's possible to track the bones using some hacks, as seen with eg. "cycling trough all entities" by halo. With the kernel32 call RTLMoveMemory (or MemoryMove :)) it may be possible. Probably somebody already tried it?


OJay(Posted 2007) [#4]
maybe thats gonna help you: http://www.blitzbasic.com/Community/posts.php?topic=62559


jfk EO-11110(Posted 2007) [#5]
Yeah, great find. Didn't try it yet, but Tom's code snippet seems to be exactly what I'm looking for. Thanks!