Debug sampling of an animation works. Though extremely experimental/explorative.
This commit is contained in:
parent
c642fa2a04
commit
9947ee7526
@ -156,6 +156,13 @@ void SyncedAnimationGraph::_process_graph(double p_delta, bool p_update_only) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static double debug_time = 0.;
|
||||||
|
debug_time += p_delta;
|
||||||
|
if (debug_time > 2.0) {
|
||||||
|
debug_time = 0.;
|
||||||
|
}
|
||||||
|
|
||||||
|
current_time = debug_time;
|
||||||
|
|
||||||
// LocalVector<AnimationMixer::TrackCache *> &track_num_to_track_cache = animation_track_num_to_track_cache[a];
|
// LocalVector<AnimationMixer::TrackCache *> &track_num_to_track_cache = animation_track_num_to_track_cache[a];
|
||||||
const Vector<Animation::Track *> tracks = animation->get_tracks();
|
const Vector<Animation::Track *> tracks = animation->get_tracks();
|
||||||
@ -185,6 +192,7 @@ void SyncedAnimationGraph::_process_graph(double p_delta, bool p_update_only) {
|
|||||||
Vector3 pos;
|
Vector3 pos;
|
||||||
animation->try_position_track_interpolate(i, animation_time, &pos);
|
animation->try_position_track_interpolate(i, animation_time, &pos);
|
||||||
skeleton->set_bone_pose_position(bone_idx, pos);
|
skeleton->set_bone_pose_position(bone_idx, pos);
|
||||||
|
print_line(vformat("t = %3.3f: setting bone %d pos to %2.3f, %2.3f, %2.3f", animation_time, bone_idx, pos.x, pos.y, pos.z));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user