Construct-bugs icon indicating copy to clipboard operation
Construct-bugs copied to clipboard

Sprites overlapping things they shouldn't be in 3D render

Open userliffy opened this issue 1 year ago • 2 comments

Problem description

I'm having an issue with multiple things overlapping/phasing into things they shouldn't be.

_

First example (the video attached under "Observed result"): The players are overlapping the soccer goal despite the goal being closer to the 3D camera. It's also happening with one of the 2D sprites that's laying on the ground. It keeps appearing above the soccer goal even though the goal is closer to the camera and has a higher z elevation.

Second example (the screenshot attached under "Observed result"): In the screenshot, the green obstacle and the coin behind the green obstacle, have shadows from the ShadowLight object. For whatever reason, the green obstacle's shadow is displaying over the green obstacle, as if the shadow is on top of it. Also, the coin's shadow is shown in front of the green obstacle despite the coin being farther behind.

I haven't been on Construct in a bit so I went through all of the releases to see when this issue first started. The earliest there were no overlapping issues was R364. From R365 and onward, it's been an issue.

Attach a .c3p

Overlapping_Issues.zip

Steps to reproduce

  1. Just open the project and you'll see the issue from the screenshot under "Observed result"

Observed result

https://github.com/Scirra/Construct-bugs/assets/116850319/16abf2c5-2bda-4def-8bd2-87913e89ae7c

R365

Expected result

R364

^In this, the shadows aren't overlapping the obstacles and the coin's shadow isn't overlapping them either.

More details

Affected browsers/platforms:

First affected release: r365

System details

View details

PASTE HERE

userliffy avatar Apr 25 '24 04:04 userliffy

This renders correctly in WebGPU mode. It only appears incorrect in WebGL mode. This appears to be an accidental regression from fixing #7429. However the project is quite complex and it is extremely difficult to debug. Can you provide a minimal project as per the bug report guidelines? It's essential to make sure it is feasible to fix the problem.

AshleyScirra avatar May 13 '24 11:05 AshleyScirra

@AshleyScirra

issue7969.zip

observed expected

I advise you to pay close attention to the values of the Z elevation and Z index parameters of objects.

WilsonPercival avatar May 13 '24 12:05 WilsonPercival