mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Add FPS compatible option in second mode of animation editor snapping
This commit is contained in:
parent
e65a23762b
commit
64d04c375c
4 changed files with 66 additions and 10 deletions
|
|
@ -580,8 +580,10 @@ float AnimationPlayerEditor::_get_editor_step() const {
|
|||
const Ref<Animation> anim = player->get_animation(current);
|
||||
ERR_FAIL_COND_V(anim.is_null(), 0.0);
|
||||
|
||||
float step = track_editor->get_snap_unit();
|
||||
|
||||
// Use more precise snapping when holding Shift
|
||||
return Input::get_singleton()->is_key_pressed(Key::SHIFT) ? anim->get_step() * 0.25 : anim->get_step();
|
||||
return Input::get_singleton()->is_key_pressed(Key::SHIFT) ? step * 0.25 : step;
|
||||
}
|
||||
|
||||
void AnimationPlayerEditor::_animation_name_edited() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue