Skip to content

Commit

Permalink
Improve FBX motion support
Browse files Browse the repository at this point in the history
  • Loading branch information
ButzYung committed Feb 6, 2023
1 parent 3aae4d9 commit 30fb970
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions MMD.js/MMD_SA.js
Original file line number Diff line number Diff line change
Expand Up @@ -10282,6 +10282,7 @@ for ( let i = 0, i_max = track.values.length; i < i_max; i += 3 ) {


if (b_intermediate.length) {
const v_offset = v4.set(0,0,0);
b_intermediate.forEach((name, idx)=>{
const q = q_list[idx];
if (!q || !q.tracks || !q.tracks.position) return;
Expand All @@ -10290,9 +10291,9 @@ if (b_intermediate.length) {
const v_flat = get_sub_track_value(track, v_track, i/3, q);

const b = asset.getObjectByName(name);
v1.fromArray(v_flat).applyQuaternion(q1.copy(b.quaternion).conjugate());
_vec3.add(v1);
v_offset.add(v1.fromArray(v_flat)).applyQuaternion(q1.copy(b.quaternion).conjugate());
});
_vec3.add(v_offset);
}


Expand Down

0 comments on commit 30fb970

Please sign in to comment.