macroquad
macroquad copied to clipboard
tiled: Support tile flipping flags
This feature requires fixing rotation code. At line 121@tiled/src/lib.rs we should multiply by
90
instead of-90
.
Please disregard my previous comment.
Currrently this works for me, though I'm sure there must be a simpler method to do this:
flip_x: (flags.horizontally
&& (!flags.antidiagonally || (flags.vertically && flags.antidiagonally)))
|| (!flags.horizontally && flags.antidiagonally && !flags.vertically),
flip_y: flags.vertically && !flags.antidiagonally && !flags.horizontally,
rotation: if flags.antidiagonally {
if !flags.horizontally {
-f32::consts::PI / 2.0
} else {
f32::consts::PI / 2.0
}
} else {
0.
}
I'll close this now.