Direct Access to Bones

BlitzMax Modules Forums/MiniB3D/Direct Access to Bones

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I have been attempting to directly access the bones in my .b3d file without success.

here is the .b3d file and code
www.bmaxbook.com/BoneTest.zip

it is a very simple file:
turretmesh: the 'skin'
bodybone: the bone that the lower part is attached to
headbone: the bone that the upper part is attached to.

i have animation in there so if you animate(turret) after load you will see it (don't forget to uncomment updateworld)

I want to control the headbone manually (i.e rotate it programmatically independent of the animation keys)

here is the code that I am using (same as in zip)
Import sidesign.MiniB3D
Strict

Graphics3D 800,600,32

Local turret:Tentity = LoadAnimMesh("turretbones.b3d")
Local  headbone:Tentity


'headbone = FindChild(turret , "headbone")
If CountChildren(turret) > 0
	For Local childcount:Int = 1 To CountChildren(turret)
		Local child:Tentity = GetChild(turret,childcount)
				Print EntityName(child)
					For Local childcount2:Int = 1 To CountChildren(child)
						headbone = GetChild(child,childcount2)
							Print EntityName(headbone)
		Next	
	Next	
EndIf 

Local cam:Tcamera = CreateCamera()
MoveEntity cam,0,10,-25

Local R# = 0.0
	Repeat
	
	R:+1
	'RotateEntity headbone,0,R#,0,1
	TurnEntity headbone,0,1,0,1



'UpdateWorld
RenderWorld
Flip

Until KeyDown(KEY_ESCAPE)