Skip to content

Conversation

vaner-org
Copy link
Contributor

@vaner-org vaner-org commented Sep 1, 2025

Closes #12550.

Adds an editor setting 3D > Ignore Backfaces on Selection that is true by default.
Adds an optional parameter and an if statement to TriangleMesh's intersect_ray function.

@vaner-org vaner-org requested review from a team as code owners September 1, 2025 23:59
@YeldhamDev
Copy link
Member

This should also be implemented for remote selection.

@vaner-org vaner-org force-pushed the selection-ignore-backfaces branch from d388708 to 746aa1d Compare September 2, 2025 00:13
@vaner-org vaner-org requested a review from a team as a code owner September 2, 2025 00:13
@vaner-org
Copy link
Contributor Author

This should also be implemented for remote selection.

✔️ Done.

@vaner-org vaner-org force-pushed the selection-ignore-backfaces branch from d43059d to 4325e1f Compare September 2, 2025 08:20
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally on https://github.com/Calinou/godot-reflection, it works as expected. Code looks good to me.

In the example below, the camera is stuck inside geometry.

Before

ignore_backfaces_before.mp4

After

ignore_backfaces_after.mp4

@KoBeWi
Copy link
Member

KoBeWi commented Sep 2, 2025

Does it need to be a setting? Why would someone want to turn it off?

@Calinou
Copy link
Member

Calinou commented Sep 2, 2025

Does it need to be a setting? Why would someone want to turn it off?

I can't see a reason to turn it off, so I think the setting should be removed too. We can introduce it in a future PR if there's a proven need for it.

@vaner-org vaner-org force-pushed the selection-ignore-backfaces branch from 4325e1f to 93195f5 Compare September 3, 2025 00:47
@vaner-org
Copy link
Contributor Author

I've removed the editor setting and hardcoded our two calls to intersect_ray to ignore backfaces.

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.

Ignore backfaces when selecting Node3Ds in the Editor viewport
5 participants