Hello, away3d focum, I would like to update vertexPositionData by using fromVectors function . However then, shadow is changed incorrectly.
(using Away3D 4.1.6)
Please see the image
The code I wrote is following.
//mesh is sphere
var vx:Vector.<Number> = mesh.geometry.subGeometries[0].vertexPositionData;
var uvs:Vector.<Number> = mesh.geometry.subGeometries[0].UVData;
var nml:Vector.<Number> = mesh.geometry.subGeometries[0].vertexNormalData;
var tan:Vector.<Number> = mesh.geometry.subGeometries[0].vertexTangentData;
//change vx position
vx[ vxNo * 3 + 0 ] = X;
vx[ vxNo * 3 + 1 ] = Y;
vx[ vxNo * 3 + 2 ] = Z;
//update vx position
mesh.geometry.subGeometries[0].fromVectors( vx, uvs, nml, tan );
If it is difficult to update shadow correctly, It’s OK that the shadow is not updated visual, just only modify the figure.
Could you give me any hint
best regards.