Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why do shapes vanish when on a box #108

Open
coder787 opened this issue Apr 3, 2021 · 2 comments
Open

why do shapes vanish when on a box #108

coder787 opened this issue Apr 3, 2021 · 2 comments

Comments

@coder787
Copy link

coder787 commented Apr 3, 2021

when I place a shape on a box it vanishes completely now and then when rotating

I know there is z-fighting which can be seen when a rectangle is on a rectangle but wouldn't expect it to vanish completely. Tried to do grouping to fix it but doesn't seem to make a difference.

see simple demo I created here, thanks.

https://codepen.io/coder787/pen/MWJbJQo

@snissn
Copy link

snissn commented Aug 27, 2021

hi - i think i have a similar issue here https://jsbin.com/kukabohixe/edit?html,css,console,output

@different55
Copy link

different55 commented Jan 17, 2025

I know this is old but just to add an answer here, mostly for my own reference tbh, this is a Z-fighting issue. Specifically, it's the last example of it in the docs here. When the center of the big object becomes closer to the camera than the center of the small object, it'll vanish entirely behind it even if you know, physically, that it wouldn't be occluded at all.

This is something that can be worked around by adding a balancing invisible object to a group, a good choice is often reflecting the visible object around to the opposite side of the surface it's clinging to.

This is coder787's example, with the top rect being given a counterbalance and the bottom left with the issue for comparison. Wiggling the camera up and down from the preset position demonstrates the issue and fix pretty well.

https://codepen.io/different55/pen/MYgXdzj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants