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

Worldspawn is recentred around origin, while groups remain where they are #156

Open
IntangibleMatter opened this issue Apr 7, 2024 · 4 comments

Comments

@IntangibleMatter
Copy link

IntangibleMatter commented Apr 7, 2024

Version: Qodot 2024.1
Trenchbroom version: 2024.1
Godot Version: 4.2.1.stable

I've been using Qodot and Trenchbroom for my project for a few months now. I recently updated to the latest version, and everything was working fine. Yesterday everything was working perfectly fine, but today when I built my map it was offset dramatically. After much testing, and the creation of a second project with which to test, I determined that the geometry is being offset in such a way that WorldSpawn is closer to being centred around the origin. The offset seems to be much more dramatic horizontally than vertically, and the offset amount seems to be related to the scale of the map.

I'm certain the offset is with worldspawn due to testing a scene with a cube, and a cube above it in a group. When another cube is added next to the cube that's part of worldspawn, the worldspawn is offset, while the group remains in place.

This is the geometry as it exists in trenchbroom.
image
This is how it's reconstructed in Godot. (the floating cube is the item in the group "test")
image

The following is a small project recreating the issue:

qodottest.zip

I'd try to mark this as urgent, but I lack a way to. This is just an utterly bizzare bug that popped up without warning. The only workaround is manually offsetting the worldspawn every time the map is rebuilt. And that's not really a workaround. (though possibly another one would be adding everything to a group, but that's suboptimal for various reasons)

Edit: while this looks like a duplicate of #153, this is with the default definitions. Additionally, there's an error stating res://addons/qodot/src/nodes/qodot_map.gd:378 - Invalid call. Nonexistent function 'get_entity_definitions' in base 'Resource (QodotFGDFile)'. whenever a build occurs.

@milk9111
Copy link

I'm having the same issue.

@milk9111
Copy link

milk9111 commented Apr 11, 2024

Looks like this is happening here which was last updated as part of this PR. However, I'm not sure if that is what introduced the issue in the first place. Taking out the entity_idx != 0 condition appears to preserve the TrenchBroom positions which also fixes the offset issue.

@IntangibleMatter
Copy link
Author

I ended up not resolving the issue and just moving to FuncGodot, which seems to be the "newer" Qodot

@milk9111
Copy link

I think it's actually an issue with the default QodotFGDFile resource and how it's being loaded in initially. If you click the Make Unique button on the Entity Fgd field in the Inspector then that fixes everything.

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

2 participants