Layout Scale - mouse/touch issues

Bugs will be moved here once resolved.

Post » Tue May 13, 2014 3:13 pm

Problem Description
When using layout scale it seems there is a misalignment between the mouse and touch objects. When using an event that relies upon the specifics of where you are clicking or touching the layout (such as creating an object where the user has clicked or touched, as in my case), then a created object will be in the completely wrong place.

CAPX link here (because for some reason this form kept resetting when I tried to attach it here)

http://www.scirra.com/arcade/addicting- ... dens-world

Description of Capx
This capx loads the whole game, using layout scale to resize layouts to fit the Scirra Arcade window constraints.
It is the 'tutorial level' Event Sheet that you'll be interested in, specifically the 'HUD' Group.

Steps to Reproduce Bug
  • Step 1 - Load tutorial Level
  • Step 2 - Use Space to attack small trees and collect wood
  • Step 3 - Once you have 4 or more wood, press 'U' to open menu and click on the bed
  • Step 4 - Click yes to build bed
  • Step 5 - You will be asked to click on the layout to choose where the bed will be built

Observed Result
The bed is built somewhere in the complete wrong place (usually off-screen)

Expected Result
The bed will be built where the user clicks usually (in a build without layout scaling)

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

Operating System and Service Pack
____ Your operating system and service pack ____

Windows 7, latest SP I think

Construct 2 Version ID
R169
B
15
S
5
G
4
Posts: 25
Reputation: 5,634

Post » Tue May 13, 2014 11:45 pm

Do you have a stable version (168) example that you can post?

Check your parallax settings.
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,283

Post » Thu May 15, 2014 3:40 pm

Sorry, I don't as I updated recently, but the same issue was happening in 168. My parallax settings are at normal (100) as I haven't needed to change them.
B
15
S
5
G
4
Posts: 25
Reputation: 5,634

Post » Thu May 15, 2014 5:55 pm

Are you using the mouse object and the touch object?
Is it only happening in the arcade? Or does it also happen when you run it locally?
If you want, you can PM me address to download and I'll take a look at it.
B
75
S
23
G
3
Posts: 673
Reputation: 9,283

Post » Tue May 20, 2014 12:14 pm

Closing, please follow the bug report guidelines and post a minimal .capx, not your whole project. Also note this type of thing can happen if you use Mouse.X/Touch.X without specifying the layer to translate to, such as Touch.X("Layer 1"), which is not a bug, just a common mistake.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,361


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests