Issue with canvas resizing and layer scale rate

Bugs will be moved here once resolved.

Post » Fri Jun 02, 2017 4:34 am

Problem Description
Issue with canvas resizing and layer scale rate

Attach a Capx
http://headbangames.com/canvasresize.capx

Description of Capx
Changing window/canvas size and scaling the layout while using low quality scaling for resolution selection.

Steps to Reproduce Bug
  • Click the screen to change window/canvas size and layout scale, objects are aligned correctly on all canvas sizes.
  • In the editor, change the scale rate of one of the layers to say 70%.
  • Try again.

Observed Result
layers are only aligned when layout scale is 1, on other scales they're not aligned, it even affects the other layers with 100% scale rate.

Expected Result
Layers should keep the same position and size, regardless of layout scale.

Affected Browsers
  • Chrome: (YES)
  • FireFox: (YES)
  • Internet Explorer: (YES)

Operating System and Service Pack
Windows 10.0.15063 Build 15063

Construct 2 Version ID
r244
Image
B
80
S
30
G
12
Posts: 517
Reputation: 12,713

Post » Mon Jun 26, 2017 12:46 pm

I think it's actually working correctly. You're changing the layout scale but have bounded scrolling enabled; that causes scrolling if it can't fit everything naturally, which is particularly likely when you use a smaller scale like 0.5. If you enable unbounded scrolling for the layout it then keeps everything centered, and just the layer with the adjusted scale rate changes size, which is to be expected since you are changing the layer scale but have adjusted the rate at which one of the layers scales relative to that.
Scirra Founder
B
399
S
236
G
89
Posts: 24,525
Reputation: 195,382

Post » Mon Jun 26, 2017 1:49 pm

So if I disable bounded scrolling and limit the scrolling manually to the layout (using the main layer as reference) it should work?

I will play around with it.
Image
B
80
S
30
G
12
Posts: 517
Reputation: 12,713

Post » Mon Jun 26, 2017 2:01 pm

@Ashley
I tried it now and still, once I change the layer scale rate of one of the layers, it shows up differently in each layout scale.
Image
B
80
S
30
G
12
Posts: 517
Reputation: 12,713

Post » Tue Jun 27, 2017 9:27 am

Yes, it will have a different scale each time you change the layout scale, because you changed the layer's scale rate.
Scirra Founder
B
399
S
236
G
89
Posts: 24,525
Reputation: 195,382

Post » Wed Jun 28, 2017 5:06 pm

@Ashley Thanks for the clarification, I was sure it was relative to the layout scale.

So just to make sure, the only solution for me is to set all layers to 100% scale-rate and then set the scale manually in the run-time (higher scale for lower scale-rate layers)?

Basically I want the main layer to be 100%, and the background (layers) are ranging from 100% or 150% for different depths, I used lower scale-rate to achieve this when I used a fixed layout scale and canvas size.
Image
B
80
S
30
G
12
Posts: 517
Reputation: 12,713

Post » Thu Jun 29, 2017 11:11 am

Yes, just manually set the layer scales. The scale rate just applies an automatic scale depending on the overall scale (which includes layout scale, hence layers change scale when you change the layout scale).
Scirra Founder
B
399
S
236
G
89
Posts: 24,525
Reputation: 195,382


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests