Forum

How to get the coordinates of bone's head and tail

11 June 2017 19:00
Hi, everyone, I want to use IK in my app, but it is not support in blend4web. So I try to design algorithm to solve the Inverse Kinematics. And to solve it, I need to know the bones coordinates.

Look forward to Look forward to your reply.
11 June 2017 19:20
Hi berdon,
This might help:
get_bone_tsr(armobj, bone_name, dest)
Or,
get_bone_tsr_rel(armobj, bone_name, dest)

You also have the set_bone functions on this page.
12 June 2017 04:11
Hi, Will, thank you very much, then I can use the angel and the length of bone to calculate the bones coordinates.
Then, I want to know whether the IK will be supported in B4W.
12 June 2017 06:00
It is probably only a matter of time. You know you can bake your IK animations? But is sounds like you want real time procedural movements. I want that for VR so your virtual arms sort of follow what the hands are doing. I have seen it in some of the games. Pretty advanced stuff for the browser but it will happen eventually.
12 June 2017 11:25
Yes, I want real time procedural movements. And I look forward the B4W's new function about IK.
12 June 2017 18:47
Reply to post of user Will Welker
Hi berdon,
This might help:
get_bone_tsr(armobj, bone_name, dest)
Or,
get_bone_tsr_rel(armobj, bone_name, dest)

You also have the set_bone functions on this page.
Hi Will, I still could't calculate the bones bones coordinates from the bones angel and the length of bone, because only the quadruples can calculate the final point from the original point, but I got an error result.
12 June 2017 20:20
I can look at it if you want to upload your project (or a simple demo with your issue). In your Project Manager, you can hit the Export Project(s) button and then attach the zip file you get to your post.
 
Please register or log in to leave a reply.