Git Product home page Git Product logo

Comments (6)

Robmaister avatar Robmaister commented on July 16, 2024

hmmm sounds like it might be a serialization problem. A value of 0 is what PolyId.Null is defined as, so it could also just be an indexing error or something like that. If you've got a relevant stack trace it may help me pinpoint the issue.

from sharpnav.

AqlaSolutions avatar AqlaSolutions commented on July 16, 2024

I sent you snb file.

        navMeshQuery = new NavMeshQuery(_new NavMeshJsonSerializer().Deserialize(map.NavMeshFile), 2048);
        var startPos = new SVector3();
        var extents = new SVector3(15f, 25f, 15f);

            p = navMeshQuery.FindNearestPoly(startPos, extents);

This just returns PolyId.Null.

from sharpnav.

AqlaSolutions avatar AqlaSolutions commented on July 16, 2024

Any news?

from sharpnav.

Robmaister avatar Robmaister commented on July 16, 2024

Sorry, spent the whole day yesterday flying. Loading up the mesh really quickly shows that poly 0 isn't drawing... Looking into it further now.

from sharpnav.

Robmaister avatar Robmaister commented on July 16, 2024

@AqlaSolutions I just commited a potential fix. Looks like somewhere along the lines of me cleaning up TiledNavMesh I changed the default tile salt to 0 instead of 1. This would mean that instead of a PolyId at (salt, tile, poly) of (1, 0, 0) it was (0, 0, 0), which is what PolyId.Null is defined as.

I also fixed how references get handled in serialization to use the existing PolyId. This breaks compatibility with the existing .snj format, so you'll need to regenerate with the newest version. There's a version check now that will throw an ArgumentException if you don't.

I'll also release 1.0.0-alpha.3 this week so you can just pull down the latest version from NuGet.

Let me know if this actually fixes the issue.

from sharpnav.

AqlaSolutions avatar AqlaSolutions commented on July 16, 2024

Now fixed, thanks!

from sharpnav.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.