|
@@ -1371,6 +1371,9 @@ void SpringBoneSimulator3D::_find_collisions() {
|
|
|
}
|
|
|
|
|
|
void SpringBoneSimulator3D::_process_collisions() {
|
|
|
+ if (!is_inside_tree()) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
for (const ObjectID &oid : collisions) {
|
|
|
Object *t_obj = ObjectDB::get_instance(oid);
|
|
|
if (!t_obj) {
|
|
@@ -1494,6 +1497,10 @@ void SpringBoneSimulator3D::_set_active(bool p_active) {
|
|
|
}
|
|
|
|
|
|
void SpringBoneSimulator3D::_process_modification() {
|
|
|
+ if (!is_inside_tree()) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
Skeleton3D *skeleton = get_skeleton();
|
|
|
if (!skeleton) {
|
|
|
return;
|
|
@@ -1515,6 +1522,9 @@ void SpringBoneSimulator3D::_process_modification() {
|
|
|
}
|
|
|
|
|
|
void SpringBoneSimulator3D::reset() {
|
|
|
+ if (!is_inside_tree()) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
Skeleton3D *skeleton = get_skeleton();
|
|
|
if (!skeleton) {
|
|
|
return;
|