Fix bone child translation
This commit is contained in:
parent
a29180e433
commit
8fa9da0442
|
@ -1,12 +1,13 @@
|
|||
package armory.logicnode;
|
||||
|
||||
import iron.math.Vec4;
|
||||
import iron.math.Quat;
|
||||
|
||||
class LookAtNode extends LogicNode {
|
||||
|
||||
var v1 = new Vec4();
|
||||
var v2 = new Vec4();
|
||||
var q = new iron.math.Quat();
|
||||
var q = new Quat();
|
||||
|
||||
public function new(tree:LogicTree) {
|
||||
super(tree);
|
||||
|
|
|
@ -37,6 +37,8 @@ class DebugConsole extends Trait {
|
|||
var physTime = 0.0;
|
||||
var physTimeAvg = 0.0;
|
||||
|
||||
public static var f = 1.0;
|
||||
|
||||
public function new() {
|
||||
super();
|
||||
|
||||
|
@ -53,6 +55,8 @@ class DebugConsole extends Trait {
|
|||
// Toggle console
|
||||
kha.input.Keyboard.get().notify(null, null, function(char: String) {
|
||||
if (char == "~") show = !show;
|
||||
else if (char == "[") f -= 0.1;
|
||||
else if (char == "]") f += 0.1;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -944,7 +944,7 @@ class ArmoryExporter:
|
|||
armature = bobject.parent.data
|
||||
bone = armature.bones[bobject.parent_bone]
|
||||
if not bone.use_relative_parent:
|
||||
bone_translation = Vector((0, bone.length, 0)) + bone.head
|
||||
bone_translation = bone.tail - bone.head
|
||||
o['parent_bone_tail'] = [bone_translation[0], bone_translation[1], bone_translation[2]]
|
||||
|
||||
# Viewport Camera - overwrite active camera matrix with viewport matrix
|
||||
|
|
Loading…
Reference in a new issue