mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
FTI - Change SceneTree global setting to static
Also fixup FTI configuration warnings so that they only output when the project is using FTI.
This commit is contained in:
@@ -509,7 +509,7 @@ Transform3D Node3D::get_global_transform_interpolated() {
|
||||
// Pass through if physics interpolation is switched off.
|
||||
// This is a convenience, as it allows you to easy turn off interpolation
|
||||
// without changing any code.
|
||||
if (is_inside_tree() && get_tree()->is_physics_interpolation_enabled() && !Engine::get_singleton()->is_in_physics_frame()) {
|
||||
if (SceneTree::is_fti_enabled() && is_inside_tree() && !Engine::get_singleton()->is_in_physics_frame()) {
|
||||
// Note that with SceneTreeFTI, we may want to calculate interpolated transform for a node
|
||||
// with physics interpolation set to OFF, if it has a parent that is ON.
|
||||
|
||||
|
||||
@@ -213,7 +213,7 @@ real_t PhysicsBody3D::get_inverse_mass() const {
|
||||
PackedStringArray PhysicsBody3D::get_configuration_warnings() const {
|
||||
PackedStringArray warnings = CollisionObject3D::get_configuration_warnings();
|
||||
|
||||
if (!is_physics_interpolated()) {
|
||||
if (SceneTree::is_fti_enabled_in_project() && !is_physics_interpolated()) {
|
||||
warnings.push_back(RTR("PhysicsBody3D will not work correctly on a non-interpolated branch of the SceneTree.\nCheck the node's inherited physics_interpolation_mode."));
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ PackedStringArray XRCamera3D::get_configuration_warnings() const {
|
||||
warnings.push_back(RTR("XRCamera3D may not function as expected without an XROrigin3D node as its parent."));
|
||||
};
|
||||
|
||||
if (is_physics_interpolated()) {
|
||||
if (SceneTree::is_fti_enabled_in_project() && is_physics_interpolated()) {
|
||||
warnings.push_back(RTR("XRCamera3D should have physics_interpolation_mode set to OFF in order to avoid jitter."));
|
||||
}
|
||||
}
|
||||
@@ -501,7 +501,7 @@ PackedStringArray XRNode3D::get_configuration_warnings() const {
|
||||
warnings.push_back(RTR("No pose is set."));
|
||||
}
|
||||
|
||||
if (is_physics_interpolated()) {
|
||||
if (SceneTree::is_fti_enabled_in_project() && is_physics_interpolated()) {
|
||||
warnings.push_back(RTR("XRNode3D should have physics_interpolation_mode set to OFF in order to avoid jitter."));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user