mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-11-21 16:37:20 +01:00
Backported from godot 4: Make SkeletonIk3D node usable
- warriormaster12
ddf93f3f59
This commit is contained in:
parent
506a0756c5
commit
a59cb3956b
@ -52,24 +52,18 @@ void SkeletonIKEditorPlugin::_play() {
|
||||
skeleton_ik->start();
|
||||
} else {
|
||||
skeleton_ik->stop();
|
||||
skeleton_ik->get_parent_skeleton()->clear_bones_global_pose_override();
|
||||
}
|
||||
}
|
||||
|
||||
void SkeletonIKEditorPlugin::edit(Object *p_object) {
|
||||
if (p_object != skeleton_ik) {
|
||||
if (skeleton_ik) {
|
||||
play_btn->set_pressed(false);
|
||||
_play();
|
||||
}
|
||||
}
|
||||
|
||||
SkeletonIK *s = Object::cast_to<SkeletonIK>(p_object);
|
||||
if (!s) {
|
||||
return;
|
||||
}
|
||||
|
||||
skeleton_ik = s;
|
||||
|
||||
play_btn->set_pressed(skeleton_ik->is_running());
|
||||
}
|
||||
|
||||
bool SkeletonIKEditorPlugin::handles(Object *p_object) const {
|
||||
|
@ -425,7 +425,7 @@ void SkeletonIK::_notification(int p_what) {
|
||||
|
||||
} break;
|
||||
case NOTIFICATION_EXIT_TREE: {
|
||||
reload_chain();
|
||||
stop();
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user