Trying to replicate "animation_movebone" from armory example but I am missing something

nb_2.blend (708.0 KB)

I was trying to replicate the official example “animation_movebone” with no luck. The idea is that the “arm” (last bone oc) fallows the cube.


second try, bugous 1st cyl nb (2).blend (744.1 KB)


1 Like

What is your problem ?

Doesn’t work as intended (read abov e). Hit play in armory and control box via w,s,d,a keys.

maybe could help you to verify this (rq: case using bone parenting, so not vertex group) Modifier Armature and Parenting Bone

Did not help :frowning:

Yes, I took time to test your blend file.

First remark, the IK modifier on Bone.010 could be deleted.

The strange behavior is appearing when the target is no more reachable by the end bone.

In the Haxe code, there is a test and then another code is executed when in this case that aligns your last bone (… which is’nt the case here) to the target and set all others angles of the bone chain to zero.

So the problem seems coming from the point 3/ of the checklist.

Interested helping more > Seeking talent for community project with serious plan! ??

Here your file with modifs nb modifDidier.blend (747.7 KB)

To have a perfect behavior, the best way is to write your own IK solver that is specialized for your design. Here for example, a first step should be to manage the max autorized angle between segments.

1 Like

Thank you! …

Are there any examples of custom self written IK solver?

Think found one:

package arm;

import iron.object.BoneAnimation;

// Moving a bone - inverse kinematics
class MoveBoneIK extends iron.Trait {

public function new() {
super(); {

  	// Fetch armature animation
  	var anim = cast(object.children[0].animation, BoneAnimation);
  	// Fetch bone
  	var bone = anim.getBone("mixamorig_LeftHandIndex4");
  	// Fetch goal
  	var tr ="Goal").transform;
  	var goal = new iron.math.Vec4();

  	anim.notifyOnUpdate(function() {
  		goal.set(tr.worldx(), tr.worldy(), tr.worldz());
  		// Align skeleton to touch the goal
  		anim.solveIK(bone, goal);


1 Like

I did for ATRAP with IA/Deep Learning/robotic. See here IA, Python and Armory 3d/Blender

It’s a domain of endless possible improvments. You first need to be familiarised with maths/quaternions/mat4.

Considering your animation, you could improve it too using weight painting, for example in the joints to avoid collisions between the boxes.

1 Like

OMG, you’r awesome. Sure dont want to join the game project :)) ??