diff --git a/native/cocos/editor-support/dragonbones-creator-support/CCArmatureCacheDisplay.cpp b/native/cocos/editor-support/dragonbones-creator-support/CCArmatureCacheDisplay.cpp index 452d3b1964..e4cb7969bd 100644 --- a/native/cocos/editor-support/dragonbones-creator-support/CCArmatureCacheDisplay.cpp +++ b/native/cocos/editor-support/dragonbones-creator-support/CCArmatureCacheDisplay.cpp @@ -281,8 +281,7 @@ void CCArmatureCacheDisplay::render(float dt) { point = (cc::Vec3 *)(dstVertexBuffer + posIndex); // force z value to zero point->z = 0; - point->x = point->x * nodeWorldMat.m[0] + point->y * nodeWorldMat.m[4] + nodeWorldMat.m[12]; // x - point->y = point->y * nodeWorldMat.m[1] + point->y * nodeWorldMat.m[5] + nodeWorldMat.m[13]; // y + point->transformMat4(*point, nodeWorldMat); } } diff --git a/native/cocos/editor-support/dragonbones-creator-support/CCArmatureDisplay.cpp b/native/cocos/editor-support/dragonbones-creator-support/CCArmatureDisplay.cpp index 6f756de34a..174c3bd35a 100644 --- a/native/cocos/editor-support/dragonbones-creator-support/CCArmatureDisplay.cpp +++ b/native/cocos/editor-support/dragonbones-creator-support/CCArmatureDisplay.cpp @@ -368,8 +368,9 @@ void CCArmatureDisplay::traverseArmature(Armature *armature, float parentOpacity for (int v = 0, w = 0, vn = triangles.vertCount; v < vn; ++v, w += 2) { middleware::V2F_T2F_C4F *vertex = triangles.verts + v; middleware::V2F_T2F_C4F *worldVertex = worldTriangles + v; - worldVertex->vertex.x = vertex->vertex.x * worldMatrix->m[0] + vertex->vertex.y * worldMatrix->m[4] + worldMatrix->m[12]; - worldVertex->vertex.y = vertex->vertex.x * worldMatrix->m[1] + vertex->vertex.y * worldMatrix->m[5] + worldMatrix->m[13]; + + vertex->vertex.z = 0;//reset for z value + worldVertex->vertex.transformMat4(vertex->vertex, *worldMatrix); worldVertex->color.r = r; worldVertex->color.g = g;