summaryrefslogtreecommitdiff
path: root/scene/3d/path_3d.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/path_3d.h')
-rw-r--r--scene/3d/path_3d.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/scene/3d/path_3d.h b/scene/3d/path_3d.h
index e9ab557693..bc4db61a01 100644
--- a/scene/3d/path_3d.h
+++ b/scene/3d/path_3d.h
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef PATH_H
-#define PATH_H
+#ifndef PATH_3D_H
+#define PATH_3D_H
#include "scene/3d/node_3d.h"
#include "scene/resources/curve.h"
@@ -41,14 +41,23 @@ class Path3D : public Node3D {
void _curve_changed();
+ RID debug_instance;
+ Ref<ArrayMesh> debug_mesh;
+
+private:
+ void _update_debug_mesh();
+
protected:
+ void _notification(int p_what);
+
static void _bind_methods();
public:
void set_curve(const Ref<Curve3D> &p_curve);
Ref<Curve3D> get_curve() const;
- Path3D() {}
+ Path3D();
+ ~Path3D();
};
class PathFollow3D : public Node3D {
@@ -65,7 +74,7 @@ public:
private:
Path3D *path = nullptr;
- real_t delta_offset = 0.0; // Change in offset since last _update_transform.
+ real_t prev_offset = 0.0; // Offset during the last _update_transform.
real_t offset = 0.0;
real_t h_offset = 0.0;
real_t v_offset = 0.0;
@@ -76,7 +85,7 @@ private:
void _update_transform(bool p_update_xyz_rot = true);
protected:
- virtual void _validate_property(PropertyInfo &property) const override;
+ void _validate_property(PropertyInfo &p_property) const;
void _notification(int p_what);
static void _bind_methods();
@@ -110,4 +119,4 @@ public:
VARIANT_ENUM_CAST(PathFollow3D::RotationMode);
-#endif // PATH_H
+#endif // PATH_3D_H