As recall names of bones?

Blitz3D Forums/Blitz3D Programming/As recall names of bones?

Yue(Posted 2012) [#1]
Is possible to retrieve the names of bones to engage objects in those positions?

I see that entintyname returns the name of the central bone of the mesh.


PowerPC603(Posted 2012) [#2]
This may be because when you load the animated mesh into a variable,
the variable holds the root-object of your entire animated mesh, which in this case is your central bone.

You can use all the child-related commands (FindChild, GetChild, CountChildren, ...) on that entity to find a particular bone or loop through them all.
All other bones should be children entities of your central bone.

You could also make a for-each loop that lists all bones in your mesh.
See the example in the docs for command CountChildren.
If you find a child entity, you can use EntityName(child) to get the name of it.

If you store the handles of every child in an array for example, you could make a custom-written animation system by manually controlling the position/rotation of each bone.

Last edited 2012


Yue(Posted 2012) [#3]
Oh! thank you very much friend

Graphics3D 800,600,32,2
SetBuffer BackBuffer()

Local Camara% = CreateCamera()
Local Plano%  = CreatePlane()
Local Luz%    = CreateLight()

Local Yue%    = LoadAnimMesh("Yue.b3d")


ScaleEntity Yue%,.02,.02,.02
PositionEntity Camara%, 0,5,-10

Yes%  = FindChild(Yue%,"Bone1")


cubo% = CreateCube(Yes%)
ScaleEntity Cubo%,50,50,50

Repeat 
	
	RenderWorld 
	
	TurnEntity Yes%,0,1,0
	
	Text 0,10,Yes%
		
		
	
	Flip 
	
Forever


Last edited 2012

Last edited 2012