I need to write a script, which makes sure, that the tip of my armature never gets under the ground, which will be a flat plane. how would i access the global position of the posebones tail?
1 Answer
If you have your armature object as arm
, you can get its nth bone’s tail local position (i.e. its pose location in armature’s object space) with arm.pose.bones[n].tail
, so to get that in world coordinates, just multiply it with the armature’s world matrix: arm.matrix_world * arm.pose.bones[n].tail
.
Note however it may be simpler (in simple cases) to use a bone constraint like Floor
or Limit Position
ones…