You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tutorials/physics/interpolation/advanced_physics_interpolation.rst
+8-4Lines changed: 8 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -76,8 +76,8 @@ What we really want to focus the camera on, is not the position of the target on
76
76
the physics tick, but the *interpolated* position, i.e. the position at which the
77
77
target will be rendered.
78
78
79
-
We can do this using the :ref:`Spatial.get_global_transform_interpolated<class_Node3D_method_get_global_transform_interpolated>`
80
-
function. This acts exactly like getting :ref:`Spatial.global_transform<class_Node3D_property_global_transform>`
79
+
We can do this using the :ref:`Node3D.get_global_transform_interpolated<class_Node3D_method_get_global_transform_interpolated>`
80
+
function. This acts exactly like getting :ref:`Node3D.global_transform<class_Node3D_property_global_transform>`
81
81
but it gives you the *interpolated* transform (during a ``_process()`` call).
82
82
83
83
.. important:: ``get_global_transform_interpolated()`` should only be used once or
@@ -142,8 +142,12 @@ and directly apply the mouse input to the camera rotation, rather than apply it
142
142
Sometimes, especially with cameras, you will want to use a combination of
143
143
interpolation and non-interpolation:
144
144
145
-
* A first person camera may position the camera at a player location (perhaps using :ref:`Spatial.get_global_transform_interpolated<class_Node3D_method_get_global_transform_interpolated>`), but control the Camera rotation from mouse look *without* interpolation.
146
-
* A third person camera may similarly determine the look at (target location) of the camera using :ref:`Spatial.get_global_transform_interpolated<class_Node3D_method_get_global_transform_interpolated>`, but position the camera using mouse look *without* interpolation.
145
+
- A first person camera may position the camera at a player location (perhaps using
Copy file name to clipboardExpand all lines: tutorials/physics/interpolation/using_physics_interpolation.rst
+11-9Lines changed: 11 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -11,9 +11,10 @@ games will work with few changes. That said there are some situations which requ
11
11
special treatment, and these will be described.
12
12
13
13
Turn on the physics interpolation setting
14
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14
+
-----------------------------------------
15
15
16
-
The first step is to turn on physics interpolation in :ref:`ProjectSettings.physics/common/physics_interpolation<class_ProjectSettings_property_physics/common/physics_interpolation>`.
16
+
The first step is to turn on physics interpolation in
17
+
:ref:`Project Settings > Physics > Common > Physics Interpolation<class_ProjectSettings_property_physics/common/physics_interpolation>`
17
18
You can now run your game.
18
19
19
20
It is likely that nothing looks hugely different, particularly if you are running
@@ -23,11 +24,12 @@ behind the scenes.
23
24
.. tip::
24
25
25
26
To convert an existing game to use interpolation, it is highly recommended that
26
-
you temporarily set :ref:`ProjectSettings.physics/common/physics_ticks_per_second<class_ProjectSettings_property_physics/common/physics_ticks_per_second>`
27
-
to a low value such as 10, which will make interpolation problems more obvious.
27
+
you temporarily set
28
+
:ref:`Project Settings > Physics > Common > Physics Tick per Second<class_ProjectSettings_property_physics/common/physics_ticks_per_second>`
29
+
to a low value such as ``10``, which will make interpolation problems more obvious.
28
30
29
31
Move (almost) all game logic from _process to _physics_process
0 commit comments