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
107 stars 83 forks source link

Platform Object falling through Jump-Thru when spawning within another one #4021

Closed VonFirflirch closed 4 years ago

VonFirflirch commented 4 years ago

Problem description

I was stacking a couple of Jump-thru objects on top of each other. Upon adding objects with the platform behavior on them, I noticed that the ones that were standing on a Jump-Thru while being inside another one will fall through. I'm not sure if it's too clear, but things should make more sense in the .c3p file.

Attach a .c3p

https://www.dropbox.com/s/ey4v8vaqzs3eziu/Fall_Through_Jumpthroughs.c3p?dl=0

Steps to reproduce

  1. Simply preview the project ;
  2. Pressing [Space] will destroy the platform objects and recreate them, yielding the same result.

Observed result

The one instance of the Sprite object (with Platform Behavior) that spawns on the lower 9Patch (with Jump-Thru Behavior), overlapping with the upper one, falls through the floor.

Expected result

It should remain on the 9Patch it spawned on, like every other instance of the Sprite object in the layout.

More details

Affected browsers/platforms:

Chrome/Microsoft Edge on Windows

Affected version(s): I ran into this on R204 but never tested it earlier.

System details

View details Platform information Browser: Chrome Browser version: 83.0.4103.116 Browser engine: Chromium Browser architecture: 64-bit Context: browser Operating system: Windows Operating system version: 10 Operating system architecture: 64-bit Device type: desktop Device pixel ratio: 1 Logical CPU cores: 4 Approx. device memory: 8 GB User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36 C3 release: r206 (beta) Language setting: fr-FR Local storage Storage quota (approx): 274 gb Storage usage (approx): 135 mb (0%) Persistant storage: Yes Browser support notes This list contains missing features that are not required, but could improve performance or user experience if supported. Nothing is missing. Everything is OK! WebGL information Version string: WebGL 2.0 (OpenGL ES 3.0 Chromium) Numeric version: 2 Supports NPOT textures: yes Supports GPU profiling: yes Supports highp precision: yes Vendor: Google Inc. Renderer: ANGLE (NVIDIA GeForce GT 705 Direct3D11 vs_5_0 ps_5_0) Major performance caveat: no Maximum texture size: 16384 Point size range: 1 to 1024 Extensions: EXT_color_buffer_float EXT_disjoint_timer_query_webgl2 EXT_float_blend EXT_texture_compression_bptc EXT_texture_compression_rgtc EXT_texture_filter_anisotropic KHR_parallel_shader_compile OES_texture_float_linear WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_lose_context OVR_multiview2 Audio information System sample rate: 48000 Hz Output channels: 2 Output interpretation: speakers Supported decode formats: Ogg Opus (audio/ogg; codecs=opus) WebM Opus (audio/webm; codecs=opus) Ogg Vorbis (audio/ogg; codecs=vorbis) WebM Vorbis (audio/webm; codecs=vorbis) MPEG-4 AAC (audio/mp4; codecs=mp4a.40.5) 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 VP9 (video/webm; codecs=vp9) WebM VP8 (video/webm; codecs=vp8) Ogg Theora (video/ogg; codecs=theora) H.264 (video/mp4; codecs=avc1.42E01E) Supported encode formats: WebM VP9 (video/webm; codecs=vp9) WebM VP8 (video/webm; codecs=vp8)
AshleyScirra commented 4 years ago

In Construct, exactly adjacent objects count as touching. (We could never change this by now since it would break loads of projects.) Since an object is created exactly adjacent to, and therefore touching, a jump-thru, it's the same as if you created it somewhere half-way down. In that case since it's a jump-thru, it falls through it. The workaround is simple though - just create it a little further up.