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

CSGCombiner3D is modified when changing scenes with change_scene_to_file #72771

Closed
Lippanon opened this issue Feb 5, 2023 · 5 comments · Fixed by #77118
Closed

CSGCombiner3D is modified when changing scenes with change_scene_to_file #72771

Lippanon opened this issue Feb 5, 2023 · 5 comments · Fixed by #77118

Comments

@Lippanon
Copy link

Lippanon commented Feb 5, 2023

Godot version

v4.0.beta.custom_build [2bd5302] ; v4.0.beta17.official [c400205]

System information

Windows 10, Vulkan

Issue description

This is a regression since v4.0.beta16.official [518b9e5], though I haven't bisected the commit that caused it.

When using change_scene_to_file to load into a new scene, a CSGCombiner3D with a child CSGPolygon3D is modified from how it looks in the editor (or running the scene first).
Observe how the MRP scene looks in the editor:
image

How it looks when using Run Current Scene (F6):
image

How it looks when running the project with a simple script that loads into the same scene:
image

The script:

extends Control

func _ready() -> void:
	get_tree().change_scene_to_file("res://node_3d.tscn") # res://node_3d.scn is the same scene but it wouldn't open in Beta 16 that I used to test (corrupt)

The hole is gone. The remote editor seems to show the same values and the nodes are all there.
I don't know if something else broke with change_scene_to_file, if someone knows a workaround please share it.

Steps to reproduce

Run the MRP. Note: the 3d scene .scn binary format won't open in Beta 16, the .tscn is the same scene and it opens, that might be a clue.

Minimal reproduction project

csg bug.zip

@Lippanon
Copy link
Author

Lippanon commented Feb 6, 2023

I used Windows Builds artifacts to narrow it down (it takes me a long time to build Godot):
v4.0.beta.custom_build [045822e66] - no bug
v4.0.beta.custom_build [f5cf2d992] - no bug
v4.0.beta.custom_build [5bcf016] - has bug

image

I don't know if this necessarily means that #62737 introduced it.
Reference: https://github.com/godotengine/godot/actions/workflows/windows_builds.yml?page=19

@akien-mga
Copy link
Member

To properly bisect using GitHub artifacts, you should use only artifacts from "Merge pull request" commits. The other ones are from PRs, and may be based on older branches and not include what caused the regression (even if the build happened later).

@Lippanon
Copy link
Author

Lippanon commented Feb 6, 2023

v4.0.beta.custom_build [62689af] - has bug
v4.0.beta.custom_build [eedc455] - no bug

Which should mean #72427 has caused this regression. @MinusKube

@etodd
Copy link
Contributor

etodd commented May 15, 2023

I am running into this too, and I found that everything works when collision is enabled. Based on the original bug #71240 that was fixed by #72427, I think this should be an easy fix. I'll attempt it.

@etodd
Copy link
Contributor

etodd commented May 16, 2023

My PR (#77118) fixes this:

image

@akien-mga akien-mga added this to the 4.1 milestone May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants