getPositionData(false, true) does not return updated morphtarget vertices when influences are negative

Hi,

I think I’ve stumbled upon some unexpected behavior in getPositionData. Basically, while a morphtarget will arbitrarily interpolate on any given influence value visually, getPositionData(false, true) will only return the morphed vertex positions if the influence is positive.

Here’s a repro: https://playground.babylonjs.com/#HPV2TZ#434

When I set the influence to a positive value, the downloaded mesh will match the morphed mesh in the scene. But when I set the influence to a negative value and run the playground example, the downloaded mesh will match the original mesh vertex positions, but the mesh in the scene will be correctly morphed with the negative influence.

Any thoughts on why this may happen?

Cheers,
Jovid

Welcome aboard!

We didn’t allow negative influences when getting morphed data. This PR will allow it:

1 Like

Evgeni, thanks for such a quick solution!