CameraPick() and animated mesh

Blitz3D Forums/Blitz3D Programming/CameraPick() and animated mesh

jayparker(Posted 2007) [#1]
I've tried everything and cannot get this thing working.
I have a door, which is animated mesh, EntityPickMode is set and when I'm trying to pick the door with CameraPick(), it returns value zero, but when I have non-animated mesh, CameraPick() works just fine.

So my question is: Is it even possible to pick animated mesh? :)


big10p(Posted 2007) [#2]
I've never tried picking an animated mesh, TBH, but I'd imagine it can be done - maybe not in poly pickmode, tho.

What pickmode are you using?


b32(Posted 2007) [#3]
I think it is possible, but it can be quite slow.
You could try to loop through all child entities and enable entitypickmode for each one, like this:
Function AnimEntityPickMode(ent, mode)
 if entityclass$(ent) = "Mesh" then entitypickmode ent, mode
 for i = 1 to countchildren(ent)
   AnimEntityPickMode(getchild(ent, i), mode)
 next
End function



jayparker(Posted 2007) [#4]
@big10p: I tried them all :)

I did solve this problem with another method so I don't have to use pick commands at all.


jfk EO-11110(Posted 2007) [#5]
As B32 said, you have to apply these things recursively to all children of an animmesh. Not only the pickmode, but also eg. Alpha, FX etc. THere's also an example on alpha in the archives.


KimoTech(Posted 2007) [#6]
Year .. If its an animated mesh, the main entity is just a pivot containing all the underlying meshes.