Mirror & Flip doesn't work when object has 0 height, 0 width

Bugs will be moved here once resolved.

Post » Tue Jun 06, 2017 4:13 am

Problem Description
When an object has 0 width, 0 height and you flip it or mirror it, then expand height or width, it's not flipped or mirrored.


Steps to Reproduce Bug
  • Create sprite with 0 width 0 height
  • Mirror it
  • Expand height and width to 100
  • Object won't be mirrored as if mirrored wasn't applied.

Observed Result
Object doesn't flip or mirror

Expected Result
Object mirrors

Affected Browsers
  • Chrome: (YES

Operating System and Service Pack
Windows 7

Construct 2 Version ID
r243
B
37
S
6
G
1
Posts: 301
Reputation: 2,865

Post » Tue Jun 06, 2017 5:39 am

Width, and height are what define flipped, and mirrored.
Try setting an objects width to self.width*-1 as an experiment.
Image ImageImage
B
169
S
50
G
169
Posts: 8,285
Reputation: 108,214

Post » Thu Jun 22, 2017 3:55 pm

Closing as won't fix. As @newt pointed out, mirror and flip invert the width and height, and with this approach it has no effect if the size is zero.
Scirra Founder
B
395
S
232
G
88
Posts: 24,368
Reputation: 193,756

Post » Fri Jun 23, 2017 4:21 am

@Ashley, of course it shouldn't have an effect if mirror is applied, but shouldn't the mirror remain afterwards when you extend it? I realize the process is mathematically correct but the wording on "flipped” state and "mirrored” state indicates that once you apply it, it should behave as it is flipped/mirrored.

It's a small matter, I'd probably never benefit from it, was just interested in getting it to be more intuitive maybe.
Thanks anyway!
B
37
S
6
G
1
Posts: 301
Reputation: 2,865

Post » Fri Jun 23, 2017 5:42 am

I think you're expecting the object to be redrawn in reverse, but that's an expensive operation, and would take at least a tick to finish.
Flipped, and mirrored are just tags to make it easier to work with versus using the actual states of the object.
Like technically you could just compare the width of the object, but that's definitely not intuitive.
Image ImageImage
B
169
S
50
G
169
Posts: 8,285
Reputation: 108,214


Return to Closed bugs

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest