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

Fix debug collision shape reduced opacity when instanced #102881

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aryan-11825114
Copy link
Contributor

Fixes #102806

Before After
Screenshot From 2025-02-15 08-15-46 Screenshot From 2025-02-15 08-14-41

@aryan-11825114 aryan-11825114 requested a review from a team as a code owner February 15, 2025 02:50
@akien-mga
Copy link
Member

Based on the code this was intentional in #90644, so CC @BattyBovine @Calinou to re-assess.

@Calinou
Copy link
Member

Calinou commented Feb 15, 2025

This is indeed intentional behavior, so that the collision gizmos look less intrusive in complex 3D scenes.

However, we could choose to disable the reduction in gizmo opacity of instanced subscenes if #98370 is implemented.

@aryan-11825114
Copy link
Contributor Author

This is indeed intentional behavior, so that the collision gizmos look less intrusive in complex 3D scenes.

However, we could choose to disable the reduction in gizmo opacity of instanced subscenes if #98370 is implemented.

I agree, perhaps this could be merged after #98370 has been merged

@HerrSersch
Copy link
Contributor

This is indeed intentional behavior, so that the collision gizmos look less intrusive in complex 3D scenes.

That makes sense. After reading everything, I think my issue might be a case of "I misunderstood and misused the feature and then wondered why it doesn't work as intended".

I thought this was a bug because I was creating reusable trigger scenes with an Area3D as the root and a CollisionShape3D as a child and noticed they were much more transparent when I used them in a level than when I was editing them. However, I now think this is an user error for the following reason:

Because the CollisionShape3D is a child node, I can't adjust its size directly in the map where I'm using the trigger. So I scaled the entire instanced trigger scene instead. The editor complains right away about the non-uniformly scaled Area3D, which I ignored, because I couldn't find any problems while testing. But technically, it's still the wrong approach.

The correct approach would either be to activate "Editable Children" for the instanced trigger and resize the CollisionShape3D manually or to not include the collider in the scene and add it manually in the level. In both cases, the color would be at the intended intensity.

@akien-mga akien-mga modified the milestones: 4.4, 4.5 Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CollisionShape3D's debug_color has reduced opacity when instanced in other scenes
4 participants