PathFollow¶
Inherits: Spatial < Node < Object
Point sampler for a Path.
Descripción¶
This node takes its parent Path, and returns the coordinates of a point within it, given a distance from the first vertex.
It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be children of this node. The descendant nodes will then move accordingly when setting an offset in this node.
Propiedades¶
|
||
|
||
|
||
|
||
|
||
|
||
|
Enumeraciones¶
enum RotationMode:
ROTATION_NONE = 0 --- Forbids the PathFollow to rotate.
ROTATION_Y = 1 --- Allows the PathFollow to rotate in the Y axis only.
ROTATION_XY = 2 --- Allows the PathFollow to rotate in both the X, and Y axes.
ROTATION_XYZ = 3 --- Allows the PathFollow to rotate in any axis.
ROTATION_ORIENTED = 4 --- Uses the up vector information in a Curve3D to enforce orientation. This rotation mode requires the Path's Curve3D.up_vector_enabled property to be set to
true
.
Descripciones de Propiedades¶
bool cubic_interp
Default |
|
Setter |
set_cubic_interpolation(value) |
Getter |
get_cubic_interpolation() |
If true
, the position between two cached points is interpolated cubically, and linearly otherwise.
The points along the Curve3D of the Path are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough.
There are two answers to this problem: either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations.
float h_offset
Default |
|
Setter |
set_h_offset(value) |
Getter |
get_h_offset() |
El nodo está desplazado a lo largo de la curva.
bool loop
Default |
|
Setter |
set_loop(value) |
Getter |
has_loop() |
Si true
, cualquier desplazamiento fuera de la longitud del camino se envolverá, en lugar de detenerse en los extremos. Úsalo para los caminos cíclicos.
float offset
Default |
|
Setter |
set_offset(value) |
Getter |
get_offset() |
La distancia desde el primer vértice, medida en unidades 3D a lo largo del camino. Esto establece la posición de este nodo en un punto dentro del camino.
RotationMode rotation_mode
Default |
|
Setter |
set_rotation_mode(value) |
Getter |
get_rotation_mode() |
Permite o prohíbe la rotación en uno o más ejes, dependiendo de las constantes RotationMode que se utilicen.
float unit_offset
Default |
|
Setter |
set_unit_offset(value) |
Getter |
get_unit_offset() |
La distancia desde el primer vértice, considerando 0,0 como el primer vértice y 1,0 como el último. Esta es sólo otra forma de expresar el desplazamiento dentro de la ruta, ya que el desplazamiento suministrado se multiplica internamente por la longitud de la ruta.
float v_offset
Default |
|
Setter |
set_v_offset(value) |
Getter |
get_v_offset() |
El nodo está desplazado perpendicularmente a la curva.