Hi,
I want to camera pick a animated entity. I have recursed the mesh and set the pickmode on all the peices.
Problem is, i need to find a way of returning the top of the tree and returning the master parent for the picked entity. I kinda assumed (foolishly) that the getparent() command would return a zero if no parent was available but it generates a entity not found.
Anyone know of another command or (must be very fast) routine for finding the master mesh of a hireachy (without recursing every child of every single mesh in ram to see if its there?
This is what i wanted to do:
I want to camera pick a animated entity. I have recursed the mesh and set the pickmode on all the peices.
Problem is, i need to find a way of returning the top of the tree and returning the master parent for the picked entity. I kinda assumed (foolishly) that the getparent() command would return a zero if no parent was available but it generates a entity not found.
Anyone know of another command or (must be very fast) routine for finding the master mesh of a hireachy (without recursing every child of every single mesh in ram to see if its there?
This is what i wanted to do:
Function GetTopOfTree(child) parent=child Repeat par=GetParent(child) If par parent=par Until not par Return parent End Function