diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index c9d831e28..5234e747c 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -211,6 +211,7 @@ The multisample anti-aliasing mode. A higher number results in smoother edges at the cost of significantly worse performance. A value of 4 is best unless targeting very high-end systems. + If [code]true[/code], the objects rendered by viewport become subjects of mouse picking process. diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index e42c34f6f..1ad260ac7 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -3469,6 +3469,13 @@ Viewport::Viewport() { local_input_handled = false; handle_input_locally = true; physics_last_id = 0; //ensures first time there will be a check + + // Physics interpolation mode for viewports is a special case. + // Typically viewports will be housed within Controls, + // and Controls default to PHYSICS_INTERPOLATION_MODE_OFF. + // Viewports can thus inherit physics interpolation OFF, which is unexpected. + // Setting to ON allows each viewport to have a fresh interpolation state. + set_physics_interpolation_mode(Node::PHYSICS_INTERPOLATION_MODE_ON); } Viewport::~Viewport() {