Fixed sync track blending jitter in debug ui.

AnimGraphEditor
Martin Felis 2021-12-03 15:54:23 +01:00
parent 6aabe98931
commit 1e1d36c5b1
2 changed files with 2 additions and 12 deletions

View File

@ -55,12 +55,7 @@ void BlendNode::Evaluate(
}
void BlendNode::DrawDebugUi() {
if (ImGui::SliderFloat("Weight", &m_weight, 0.f, 1.f)) {
m_sync_track = SyncTrack::Blend(
m_weight,
m_input_A->m_sync_track,
m_input_B->m_sync_track);
}
ImGui::SliderFloat("Weight", &m_weight, 0.f, 1.f);
ImGui::Checkbox("Sync Inputs", &m_sync_inputs);
ImGui::Text("SyncTrack");

View File

@ -59,12 +59,7 @@ void BlendSpace1D::Evaluate(
void BlendSpace1D::DrawDebugUi() {
float min_weight = m_input_weights[0];
float max_weight = m_input_weights.back();
if (ImGui::SliderFloat("Weight", &m_weight, min_weight, max_weight)) {
m_sync_track = SyncTrack::Blend(
m_weight,
m_input_0->m_sync_track,
m_input_1->m_sync_track);
}
ImGui::SliderFloat("Weight", &m_weight, min_weight, max_weight);
ImGui::Checkbox("Sync Inputs", &m_sync_inputs);
ImGui::Text("SyncTrack");