From e52892e13e62fbd31f2f23f72249f303627a8681 Mon Sep 17 00:00:00 2001 From: Abe Pazos Date: Sat, 14 Mar 2020 16:58:02 +0100 Subject: [PATCH] Plane.kt: fix uv coordinates --- orx-mesh-generators/src/main/kotlin/Plane.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/orx-mesh-generators/src/main/kotlin/Plane.kt b/orx-mesh-generators/src/main/kotlin/Plane.kt index f5b1b0d8..31e16d78 100644 --- a/orx-mesh-generators/src/main/kotlin/Plane.kt +++ b/orx-mesh-generators/src/main/kotlin/Plane.kt @@ -63,9 +63,9 @@ fun generatePlane(center: Vector3, for (u in 0 until widthSegments) { val uv00 = Vector2(u + 0.0, v + 0.0) * step - val uv01 = Vector2(u + 0.0, v + 0.1) * step + val uv01 = Vector2(u + 0.0, v + 1.0) * step val uv10 = Vector2(u + 1.0, v + 0.0) * step - val uv11 = Vector2(u + 1.0, v + 0.1) * step + val uv11 = Vector2(u + 1.0, v + 1.0) * step val c00 = corner + forwardStep * v.toDouble() + rightStep * u.toDouble() val c01 = corner + forwardStep * (v + 1).toDouble() + rightStep * u.toDouble() @@ -81,4 +81,4 @@ fun generatePlane(center: Vector3, writer(c11, up, uv00) } } -} \ No newline at end of file +}