Jump to content

Find bones

Recommended Posts

Alright, so i am now trying to find bones from soldier.gmf entity, but i am getting pretty strange results.


This code:

soldier = loadmesh("abstract::soldier.gmf")
positionentity(soldier, vec3(-6, 2, 63))
Print "X "+entityposition(FindChild( soldier, "Bip01" )).X
Print "Y "+entityposition(FindChild( soldier, "Bip01" )).Y
Print "Z "+entityposition(FindChild( soldier, "Bip01" )).Z


Is outputting this:

X 0.000000000
Y 0.992219925
Z -0.0203169920


What am i doing wrong. Same thing occurs when i try to find child named "Bip01 Head".

Share this post

Link to post

It is returning exactly what it is supposed to return, which is the local position in relation to the parent. If you are trying to get the global position values of the Bip01 bone then you have to set the global parameter in EntityPosition() to 1.

Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...