Possible Mirrored/Flipped Bug

Bugs will be moved here once resolved.

Post » Thu Aug 14, 2014 5:39 pm

Problem Description
Discovered that when a sprite is mirrored, if you increase the sprite's width, it does the opposite, and vice-versa. Didn't see this behavior documented anywhere, and causes me to have to do a workaround. I haven't checked it for flipped, but I suspect similar results.

Attach a Capx

Done.

Description of Capx
Two instanced sprites are presented. The one on the right is mirrored at the start of layout. Hitting right arrow increments width property of both sprites. Left arrow decrements width on both sprites.

Steps to Reproduce Bug
  • Step 1 Load and run .capx file.
  • Step 2 Mash left and right arrows to observe inverted width behavior.
  • Step 3 Post reply! :-)

Observed Result
Non mirrored sprite gets wider as width property increases, mirrored sprite does the opposite.

Expected Result
Both sprites increase or decrease width the same, regardless of whether mirrored is set or not.

Affected Browsers
  • Chrome: (YES/NO) Yes
  • FireFox: (YES/NO) Not tried
  • Internet Explorer: (YES/NO) Not tried

Operating System and Service Pack
Windows 7 64 Home, SP1

Construct 2 Version ID
Release 173 64bit/steam
You do not have the required permissions to view the files attached to this post.
B
11
S
4
G
1
Posts: 159
Reputation: 1,803

Post » Thu Aug 14, 2014 6:28 pm

I believe that this is deliberate. When a sprite is mirrored, the width is flipped, and negative, so only decreasing width will actually make the sprite larger.
ImageImageImageImage
B
62
S
19
G
51
Posts: 633
Reputation: 30,836

Post » Fri Aug 15, 2014 2:10 am

@DatapawWolf What would be the reason/logic for that? What purpose would it serve? If it's deliberate, why is it not documented?
B
11
S
4
G
1
Posts: 159
Reputation: 1,803

Post » Fri Aug 15, 2014 6:34 am

@Yttermayn I have absolutely no idea why. That being said, it has been around for a long time, so maybe @Ashley can clarify why it is the way it is.
ImageImageImageImage
B
62
S
19
G
51
Posts: 633
Reputation: 30,836

Post » Fri Aug 15, 2014 11:28 am

That pretty much is the definition of mirrored. Its just that Ashley made an action "mirrored" that does the work for you.
If you don't believe me try it yourself, add a - to a sprites width.
Image ImageImage
B
172
S
50
G
183
Posts: 8,443
Reputation: 115,605

Post » Fri Aug 15, 2014 12:40 pm

Closing as by design: a mirrored sprite just has a negated width. Display the width values of each instance and you'll see how it works.
Scirra Founder
B
403
S
238
G
89
Posts: 24,653
Reputation: 196,143

Post » Fri Aug 15, 2014 1:44 pm

Ok, thanks!
B
11
S
4
G
1
Posts: 159
Reputation: 1,803


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests