Jump to content

vertexData is not serialized


Dad72
 Share

Recommended Posts

Thanks DK, :)

On my project I still have a bug when using getHeightAtCoordinates. on this line:

if (z < quad.slope.x * x + quad.slope.y) {

In this function :

// Returns the element "facet" from the heightQuads array relative to (x, z) local coordinates
        GroundMesh.prototype._getFacetAt = function (x, z) {
            ...
            if (z < quad.slope.x * x + quad.slope.y) {
                facet = quad.facet1;
            }
            ...
            return facet;
        };

I recieve :

Uncaught TypeError: Cannot read property 'slope' of undefined
    at GroundMesh._getFacetAt (babylon.max.js?1488281828:41398)
    at GroundMesh.getHeightAtCoordinates (babylon.max.js?1488281828:41335)

I think this happens when you change the terrain by raising faces. the faces of the terrain are not of quads I think.

I reproduce here with a land change. getHeightAtCoordinate not working, but we see no error in the console that I have on my project where "slope" does not define

http://www.babylonjs-playground.com/#1SQFJP#15

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...