diff options
Diffstat (limited to 'scene/resources/surface_tool.cpp')
-rw-r--r-- | scene/resources/surface_tool.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp index 129f8a48ce..772b54bc53 100644 --- a/scene/resources/surface_tool.cpp +++ b/scene/resources/surface_tool.cpp @@ -541,7 +541,7 @@ Array SurfaceTool::commit_to_arrays() { ERR_CONTINUE(v.bones.size() != count); for (int j = 0; j < count; j++) { - w[idx + j] = v.bones[j]; + w[idx * count + j] = v.bones[j]; } } @@ -561,7 +561,7 @@ Array SurfaceTool::commit_to_arrays() { ERR_CONTINUE(v.weights.size() != count); for (int j = 0; j < count; j++) { - w[idx + j] = v.weights[j]; + w[idx * count + j] = v.weights[j]; } } |