Skip to content

Commit a84904d

Browse files
committed
Merge position-rotation-and-scale-intervals page into lerp-intervals
They cover the same intervals, a user got confused about the difference between these
1 parent 8da7e98 commit a84904d

File tree

4 files changed

+24
-39
lines changed

4 files changed

+24
-39
lines changed

_static/redirects.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"programming/scene-graph/scene-graph-manipulations": "programming/scene-graph/model-files",
33
"programming/models-and-actors/loading-models": "programming/scene-graph/model-files",
44
"programming/models-and-actors/level-of-detail": "programming/scene-graph/level-of-detail",
5+
"programming/intervals/position-rotation-and-scale-intervals": "programming/intervals/lerp-intervals",
6+
"programming/tasks-and-events/global-clock": "reference/builtins#the-global-clock",
57
"programming/text/index": "programming/gui/index",
68
"programming/text/text-fonts": "programming/gui/text-fonts",
79
"programming/text/text-node": "programming/gui/rendering-text",
@@ -24,7 +26,6 @@
2426
"programming/directgui/directscrolledframe": "programming/gui/directgui/directscrolledframe",
2527
"programming/timing/global-clock": "reference/builtins#the-global-clock",
2628
"programming/timing/index": "reference/builtins#the-global-clock",
27-
"programming/tasks-and-events/global-clock": "reference/builtins#the-global-clock",
2829
"programming/math-engine/matrix-representation": "programming/internal-structures/matrix-representation",
2930
"programming/math-engine/index": "programming/internal-structures/matrix-representation",
3031
"programming/multifiles/index": "programming/advanced-loading/multifiles",

programming/intervals/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ Table of Contents
131131
actor-intervals
132132
sound-intervals
133133
sequences-and-parallels
134-
position-rotation-and-scale-intervals
135134
motion-paths
136135
particle-intervals
137136
projectile-intervals

programming/intervals/lerp-intervals.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,28 @@ the lerp.
118118
same name will automatically stop when this one is started. The default is
119119
to assign a unique name for each interval.
120120

121+
Convenience Short-Hands
122+
-----------------------
123+
124+
Various convenience methods are defined on the NodePath class which provide
125+
a short-hand syntax for creating a LerpInterval for that NodePath.
126+
These are called ``posInterval()``, ``hprInterval()``, ``quatInterval``, and
127+
so on. As an example:
128+
129+
.. code-block::
130+
131+
# This lets the actor move to point 10, 10, 10 in 1.0 second.
132+
myInterval1 = myActor.posInterval(1.0, Point3(10, 10, 10))
133+
134+
# This move takes 2.0 seconds to complete.
135+
myInterval2 = myActor.posInterval(2.0, Point3(8, -5, 10))
136+
137+
# You can specify a starting position, too.
138+
myInterval3 = myActor.posInterval(1.0, Point3(2, -3, 8), startPos=Point3(2, 4, 1))
139+
140+
# This rotates the actor 180 degrees on heading and 90 degrees on pitch.
141+
myInterval4 = myActor.hprInterval(1.0, Vec3(180, 90, 0))
142+
121143
The rest of the NodePath-based LerpIntervals
122144
--------------------------------------------
123145

programming/intervals/position-rotation-and-scale-intervals.rst

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)