BUG: mesh.getPositionData blows up everytime you run it

On the first time, the values are correct.

But everytime you run it afterwards, it starts blowing up based on the mesh/skeleton matrices

Here’s the PG: https://playground.babylonjs.com/#SYQW69#1034

                var positions = mesh.getPositionData(true, true)
                console.log(positions[0]) // 58.07

                await sleep(200)
                positions = mesh.getPositionData(true, true)
                console.log(positions[0]) // 5807

                await sleep(200)
                positions = mesh.getPositionData(true, true)
                console.log(positions[0]) // 580772

mesh._getPositionData seems to work correctly, is there a reason why getPositionData and _getPositionData are different?

Here’s a PR that stabilizes the results in the PG. The new getPositionData function was missing the code to slice/copy the position array…

1 Like