Scirra / Construct-bugs

Public bug report submissions for Construct 3 and Construct Animate. Please read the guidelines then click the 'Issues' tab to get started.
https://www.construct.net
108 stars 83 forks source link

Touch and Mouse events only work in OR blocks based on the amount and order of each condition in the block #8051

Closed ChromeWisp closed 3 months ago

ChromeWisp commented 3 months ago

Problem description

As of r394, OR blocks containing conditions for both checking touch or mouse interaction with an object appear broken such that neither condition in the block may actually work. This seems different than issue #7967 because in this case, either condition should pick the object to apply the action to.

However, by adding (seemingly redundant) additional copies of those same conditions to the block in the right order, you can cause the conditions to work and successfully trigger either the touch or mouse conditions or both, depending on how you've arranged the conditions.

Attach a .c3p

TouchOrBlocks.zip

Steps to reproduce

  1. Open the project and run it on both PC and on a touchscreen device.
  2. In gameplay, notice that some objects only react to conditions on PC, while others react only on mobile, while one object reacts to neither.

Observed result

OR blocks with touch & mouse conditions no longer function unless given extra copies of each condition.

Expected result

An OR block containing touch and mouse conditions that pick an object would allow either of those conditions to pick an object and run the event affecting it as before.

More details

I'm attaching video of the issue on PC, though I didn't have a way to record my phone to show how the issue affects touch differently than mouse. This also seems to affect the "on object clicked" and "on object touched" conditions and maybe more, but I limited this particular issue to these conditions to keep it specific. I also noticed as you'll see in the included video that there's a strange lag time where the objects keep rotating after the mouse is moved off of them, but that may not be related at all and maybe I'll need to submit that as a separate bug too.

https://github.com/Scirra/Construct-bugs/assets/4585257/1903ada2-23ae-41bc-954f-22a82e54c62b

Affected browsers/platforms: Firefox, Chrome.

First affected release: r394

System details

View details Platform information Product: Construct 3 r394 (beta) Browser: Firefox 126.0 Browser engine: Gecko Context: browser Operating system: Windows 10 Device type: desktop Device pixel ratio: 1 Logical CPU cores: 8 Approx. device memory: (unavailable) User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0 Language setting: en-US Local storage Storage quota (approx): 10 gb Storage usage (approx): 193 mb (1.9%) Persistant storage: No Browser support notes This list contains missing features that are not required, but could improve performance or user experience if supported. Rendering multiple on-screen Layout Views is slow in Firefox due to [bug 1163426](https://bugzilla.mozilla.org/show_bug.cgi?id=1163426) The Clipboard API is not supported. Some clipboard features may be unavailable. Determining input device capabilities is not supported. WebGL information Version string: WebGL 2.0 Numeric version: 2 Supports NPOT textures: yes Supports GPU profiling: no Supports highp precision: yes Vendor: Google Inc. (NVIDIA) Renderer: ANGLE (NVIDIA, NVIDIA GeForce GTX 980 Direct3D11 vs_5_0 ps_5_0), or similar Major performance caveat: no Maximum texture size: 16384 Point size range: 1 to 1024 Extensions: EXT_color_buffer_float EXT_float_blend EXT_texture_compression_bptc EXT_texture_compression_rgtc EXT_texture_filter_anisotropic OES_draw_buffers_indexed OES_texture_float_linear OVR_multiview2 WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_lose_context WEBGL_provoking_vertex Audio information System sample rate: 48000 Hz Output channels: 2 Output interpretation: speakers Supported decode formats: WebM Opus (audio/webm;codecs=opus) WebM Vorbis (audio/webm;codecs=vorbis) MPEG-4 Opus (audio/mp4;codecs=opus) MPEG-4 AAC (audio/mp4;codecs=mp4a.40.2) MP3 (audio/mpeg) FLAC (audio/flac) PCM WAV (audio/wav;codecs=1) Supported encode formats: WebM Opus (audio/webm;codecs=opus) Video information Supported decode formats: WebM AV1 (video/webm;codecs=av01.0.00M.08) WebM VP9 (video/webm;codecs=vp9) WebM VP8 (video/webm;codecs=vp8) MPEG-4 AV1 (video/mp4;codecs=av01.0.00M.08) MPEG-4 VP9 (video/mp4;codecs=vp9) MPEG-4 H.264 (video/mp4;codecs=avc1.420034) Supported encode formats: WebM VP8 (video/webm;codecs=vp8)
WilsonPercival commented 3 months ago

You can click the Toggle device toolbar - Ctrl + Shift + M button to be able to test your mobile device.

image
AshleyScirra commented 3 months ago

This is a regression from the fix for #7912 - it should be working correctly in the next beta in all cases.

ChromeWisp commented 3 months ago

Thank you, Ashley.