Skip to content

Commit 347f16b

Browse files
committed
fix piece flip inline with coord flip
1 parent f3d8ad9 commit 347f16b

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

gui/src/wormhole/app.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,7 @@ impl AppState for State {
7777

7878
self.rotation =
7979
(glam::Quat::from_rotation_y(response.drag_motion().x * 0.01)
80-
* glam::Quat::from_rotation_x(
81-
response.drag_motion().y * 0.01,
82-
)
80+
* glam::Quat::from_rotation_x(response.drag_motion().y * 0.01)
8381
* self.rotation)
8482
.normalize();
8583

gui/src/wormhole/board_render/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,28 +192,28 @@ impl Pipeline {
192192
meshes.push(Mesh {
193193
vertices: vec![
194194
Vertex {
195-
position: (origin + dt * (vec + perp + 0.15 * up)).to_array(),
195+
position: (origin + dt * (vec - perp + 0.15 * up)).to_array(),
196196
colour: Default::default(),
197197
tex_uv: tex_uvs.0,
198198
tex_idx,
199199
colour_to_tex: 1.0,
200200
},
201201
Vertex {
202-
position: (origin + dt * (-vec + perp + 0.15 * up)).to_array(),
202+
position: (origin + dt * (-vec - perp + 0.15 * up)).to_array(),
203203
colour: Default::default(),
204204
tex_uv: tex_uvs.1,
205205
tex_idx,
206206
colour_to_tex: 1.0,
207207
},
208208
Vertex {
209-
position: (origin + dt * (vec - perp + 0.15 * up)).to_array(),
209+
position: (origin + dt * (vec + perp + 0.15 * up)).to_array(),
210210
colour: Default::default(),
211211
tex_uv: tex_uvs.2,
212212
tex_idx,
213213
colour_to_tex: 1.0,
214214
},
215215
Vertex {
216-
position: (origin + dt * (-vec - perp + 0.15 * up)).to_array(),
216+
position: (origin + dt * (-vec + perp + 0.15 * up)).to_array(),
217217
colour: Default::default(),
218218
tex_uv: tex_uvs.3,
219219
tex_idx,

0 commit comments

Comments
 (0)