summaryrefslogtreecommitdiff
path: root/scene/3d/navigation.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/navigation.h')
-rw-r--r--scene/3d/navigation.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/scene/3d/navigation.h b/scene/3d/navigation.h
index e8a97a6591..69d48531a7 100644
--- a/scene/3d/navigation.h
+++ b/scene/3d/navigation.h
@@ -41,6 +41,8 @@ class Navigation : public Spatial {
};
+ struct NavMesh;
+
struct Polygon {
@@ -57,6 +59,8 @@ class Navigation : public Spatial {
float distance;
int prev_edge;
+
+ NavMesh *owner;
};
@@ -74,6 +78,7 @@ class Navigation : public Spatial {
struct NavMesh {
+ Object *owner;
Transform xform;
bool linked;
Ref<NavigationMesh> navmesh;
@@ -113,6 +118,7 @@ class Navigation : public Spatial {
int last_id;
Vector3 up;
+ void _clip_path(Vector<Vector3>& path,Polygon *from_poly, const Vector3& p_to_point, Polygon* p_to_poly);
protected:
@@ -124,7 +130,7 @@ public:
Vector3 get_up_vector() const;
//API should be as dynamic as possible
- int navmesh_create(const Ref<NavigationMesh>& p_mesh,const Transform& p_xform);
+ int navmesh_create(const Ref<NavigationMesh>& p_mesh,const Transform& p_xform,Object* p_owner=NULL);
void navmesh_set_transform(int p_id, const Transform& p_xform);
void navmesh_remove(int p_id);