Hi, I have some motion capture data recorded in BVH format.
I'd like to import it via GDscript, slightly remap and apply it to a character skeleton that I have imported as a Scene.
Each BVH frame contains data like this:
Leftleg: 'Time', 'Xposition', 'Yposition', 'Zposition', 'Yrotation', 'Xrotation', 'Zrotation'
Leftleg: 0.008, 324.790436, 86.519325, 779.784607, -109.290268, -2.373593, 12.830636
I've tried creating a new animation and a new track and adding the data like this:
var anim = Animation.new()
anim.add_track( 0 )
anim.transform_track_insert_key( 0, 0.008000, Vector3(324.790436, 86.519325, 779.784607), Quat(-109.290268, -2.373593, 12.830636, 0), Vector3(1.0, 1.0, 1.0) )
It doesn't work and I get a lot of errors when playing the animation like:
ERROR: transform_track_insert_key: Condition ' t->type != TYPE_TRANSFORM ' is true. returned: -1
I think I need to do more to the location Vector3 and the Quat rotation than just a 1:1 transfer. Any suggestions would be appreciated.
Godot 3 has been great to work with so far and getting mocap data into godot would be amazing.