Skip to content

Commit

Permalink
Fix offset issue in displacements
Browse files Browse the repository at this point in the history
  • Loading branch information
H2xDev authored Feb 29, 2024
1 parent 16ddd3d commit 447ef9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/godotvmf/utils/VMFTool.gd
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ static func createMesh(vmfStructure: Dictionary, _offset: Vector3 = Vector3(0, 0
surfaceTool.set_uv(uv);
surfaceTool.set_normal(Vector3(normal.x, normal.z, -normal.y));
surfaceTool.set_color(dispData.getColor(x, y));
surfaceTool.add_vertex(Vector3(v.x, v.z, -v.y) * _scale);
surfaceTool.add_vertex(Vector3(v.x, v.z, -v.y) * _scale - _offset);
index += 1;

for i in range(0, pow(edgesCount, 2)):
Expand Down

0 comments on commit 447ef9a

Please sign in to comment.