randomkeyhits Posted December 1, 2014 Share Posted December 1, 2014 Ok, having done some testing I'm noticing a sort of strange behaviour with a test map I've created. Flat plane, a wedge, and a large box. The top of the wedge is connected to the box by an arch. I've created the nav mesh which looks exactly as I'd expect and allows navigation from the plane via the wedge and arch onto the box. I've set up my cam and player scripts for an isometric style view and I can click on the nav mesh and watch the player move to the specified location. All well and good. When the cursor is outside of the geometry it is a 2d cross hair suitable for clicking on any hud elements. When it is over the game geometry I make it a small globe. I then test to see if the globe location can be navigated to and if it is the globe is green else its red. Its a useful indicator of what is happening in the scene. The strange behaviour is that some sides of the box get marked as navigable when I would expect them to not be as they are vertical and have no mesh. If I click to say "go here" the player entity will try but not be able to reach final spot and be permanently in travel mode until I set a new target location. So... can anyone explain why only some walls should be navigable? I've not found anything that makes sense yet. Quote content over form, game play over all. Link to comment Share on other sites More sharing options...
AggrorJorn Posted December 1, 2014 Share Posted December 1, 2014 I haven't tried this, but when you have set the option for 'navmesh item' in the phy properties, did you have object modus or face modus selected? Resetting it and generating a new navmesh might help. Quote Link to comment Share on other sites More sharing options...
Rick Posted December 1, 2014 Share Posted December 1, 2014 What are you using to move the player? GoToPoint()? If so, this function doesn't care about the navmesh. It simply will try to go to that point. It is up to us to determine if GoToPoint() is reachable. Quote Link to comment Share on other sites More sharing options...
randomkeyhits Posted December 1, 2014 Author Share Posted December 1, 2014 @Aggror I get where you are coming from on that and went through and re-generated the nav-mesh, sadly no difference. @Rick GoToPoint() does care about the nav-mesh, the documentation says it uses the navigation system which I take to mean nav-meshes. The method I use is to create a pivot and then place it where I want it to travel to. I then tell it to go to that same location, get the return from the function and then tell it to stop regardless. If the location is on the nav-mesh then it returns true as navigable and if not it returns false. If I create a map where I can toggle parts of it as being navigable then for the flattish surfaces the behaviour is exactly as you'd expect. What is frustrating is that the walls thing isn't even consistent. Some walls behave as expected, some don't. Quote content over form, game play over all. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.