Jump to content

Find bones


Arska134
 Share

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".

Windows 7 Ultimate | Intel Core i7 930 @ 2.80 ghz | Nvidia GeForce GTX 560 | Leadwerks 2.5 | Blitzmax

Link to comment
Share on other sites

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.

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
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.

 Share

×
×
  • Create New...