From 2ee4ac183babedd679e901b0158f5268556deceb Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Thu, 14 Aug 2014 10:31:38 -0300 Subject: Little Bits -=-=-=-=-=- -Fixed small bugs all around -Added ability to show/hide entire sections of the spatial (3D) tree -WIP new vehicle (not ready yet) based on Bullet --- scene/3d/navigation.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'scene/3d/navigation.h') diff --git a/scene/3d/navigation.h b/scene/3d/navigation.h index 40f474858c..e8a97a6591 100644 --- a/scene/3d/navigation.h +++ b/scene/3d/navigation.h @@ -103,6 +103,8 @@ class Navigation : public Spatial { return Vector3(p_point.x,p_point.y,p_point.z)*cell_size; } + + void _navmesh_link(int p_id); void _navmesh_unlink(int p_id); @@ -110,18 +112,23 @@ class Navigation : public Spatial { Map navmesh_map; int last_id; + Vector3 up; + protected: static void _bind_methods(); public: + void set_up_vector(const Vector3& p_up); + Vector3 get_up_vector() const; + //API should be as dynamic as possible int navmesh_create(const Ref& p_mesh,const Transform& p_xform); void navmesh_set_transform(int p_id, const Transform& p_xform); void navmesh_remove(int p_id); - Vector get_simple_path(const Vector3& p_start, const Vector3& p_end); + Vector get_simple_path(const Vector3& p_start, const Vector3& p_end,bool p_optimize=true); Vector3 get_closest_point_to_segment(const Vector3& p_from,const Vector3& p_to); Vector3 get_closest_point(const Vector3& p_point); Vector3 get_closest_point_normal(const Vector3& p_point); -- cgit v1.2.3