Minor tweaks
This commit is contained in:
parent
79c878a8e5
commit
ed7c7902ec
@ -14,7 +14,11 @@ void SpeedScaleNode::DrawDebugUi() {
|
||||
|
||||
// ensure m_time_scale is positive
|
||||
m_time_scale = m_time_scale * (is_negative ? -1.f : 1.f);
|
||||
ImGui::SliderFloat("Time Scale", &m_time_scale, 0.01f, 5.f);
|
||||
if (ImGui::SliderFloat("Time Scale", &m_time_scale, 0.01f, 2.f)) {
|
||||
if (fabs(m_time_scale - 1.0) < 0.2) {
|
||||
m_time_scale = 1.0;
|
||||
}
|
||||
}
|
||||
// and back to the original negative or positive sign
|
||||
m_time_scale = m_time_scale * (is_negative ? -1.f : 1.f);
|
||||
}
|
||||
@ -35,14 +35,14 @@ AnimationController::AnimationController(SkinnedMesh* skinned_mesh)
|
||||
sampler_node1->SetAnimation(skinned_mesh->m_animations[2], skinned_mesh->m_animation_sync_track[2]);
|
||||
m_anim_nodes.push_back(sampler_node1);
|
||||
|
||||
// SpeedScaleNode* speed_node = new SpeedScaleNode(this);
|
||||
// speed_node->m_name = "SpeedNode0";
|
||||
// speed_node->m_input_node = sampler_node0;
|
||||
// m_anim_nodes.push_back(speed_node);
|
||||
SpeedScaleNode* speed_node = new SpeedScaleNode(this);
|
||||
speed_node->m_name = "SpeedNode0";
|
||||
speed_node->m_input_node = sampler_node0;
|
||||
m_anim_nodes.push_back(speed_node);
|
||||
|
||||
BlendNode* blend_node = new BlendNode(this);
|
||||
blend_node->m_name = "Blend0";
|
||||
blend_node->m_input_A = sampler_node0;
|
||||
blend_node->m_input_A = speed_node;
|
||||
blend_node->m_input_B = sampler_node1;
|
||||
blend_node->m_sync_inputs = true;
|
||||
m_anim_nodes.push_back(blend_node);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user