Direct Access to Bones

BlitzMax Forums/MiniB3D Module/Direct Access to Bones

bradford6(Posted 2007) [#1]
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)



bradford6(Posted 2007) [#2]
anyone have an idea?


Ricky Smith(Posted 2007) [#3]
Hi bill,
It seems you are "turning" the bone - You can verify this by putting the following line between RenderWorld and Flip.
Text 0,0,headbone.rx+": "+headbone.ry+":"+headbone.rz

The problem, I think, is that the mesh is not being deformed.
The function TAnimation.VertexDeform(ent1:TMesh,bent:TBone,vm[]) is only called when the mesh is actually animating. Probably requires a manual call to that function.


bradford6(Posted 2007) [#4]
cool. I will check that out. Thanks