Refactor Jolt-related project settings to only be loaded as needed

This commit is contained in:
Mikael Hermansson 2025-01-08 00:51:14 +01:00
parent b15b24b087
commit 3b78ff564a
18 changed files with 137 additions and 247 deletions

View file

@ -118,7 +118,7 @@ JoltJoint3D::JoltJoint3D(const JoltJoint3D &p_old_joint, JoltBody3D *p_body_a, J
body_b->add_joint(this);
}
if (body_b == nullptr && JoltProjectSettings::use_joint_world_node_a()) {
if (body_b == nullptr && JoltProjectSettings::joint_world_node == JOLT_JOINT_WORLD_NODE_A) {
// The joint scene nodes will, when omitting one of the two body nodes, always pass in a
// null `body_b` to indicate it being the "world node", regardless of which body node you
// leave blank. So we need to correct for that if we wish to use the arguably more intuitive