Skip to content

Commit

Permalink
Fixing deform data.
Browse files Browse the repository at this point in the history
  • Loading branch information
luigi-rosso committed Jan 24, 2017
1 parent 9847a06 commit 2b6ad48
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Source/ActorImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,17 @@ void ActorImage::doesAnimationVertexDeform(bool doesIt)
{
delete [] m_AnimationDeformedVertices;
m_AnimationDeformedVertices = new float [m_VertexCount * 2];

// Copy the deform verts from the rig verts.
int writeIdx = 0;
int readIdx = 0;
int readStride = vertexStride();
for(int i = 0; i < m_VertexCount; i++)
{
m_AnimationDeformedVertices[writeIdx++] = m_Vertices[readIdx];
m_AnimationDeformedVertices[writeIdx++] = m_Vertices[readIdx+1];
readIdx += readStride;
}
}
else
{
Expand Down

0 comments on commit 2b6ad48

Please sign in to comment.