Open Deltt opened 1 month ago
The scaling is applied on the DungeonRoom3D - which is a Node3D. Normally if you do this in Godot, it will warn about non uniform scaling with physics bodies and their collision shapes. I haven't tried it but I wouldn't recommend using non uniform scaling on collision shapes, as Godot warns about it.
The reason it will scale the room is so the room's voxels will fit cleanly into the DungeonGenerator3D's voxel grid and be the same size.
Unless you are trying to do something odd and experimental, I think you shouldn't ever have it scaled. It warns you that the room's voxel size does not match the dungeon's voxel size. Maybe this should result in an error instead but I decided on a warning.
The voxel_scale of every DungeonRoom3D should ideally match the DungeonGenerator3D's set voxel_scale. You are designing the rooms for the DungeonGenerator3D so I'm not really sure in which case it would be useful to have them different.
Thank you for clarifying!
The reason I asked is I was doing some experiments with the generator and noticed that with smaller Voxel scales on the dungeon generator, it seemingly has an effect on the generation itself, where as I thought it was just for scaling purposes. Voxel scales under 6 seem to fail generating extremely often in my experiments, where setting it higher would immediately succeed. Just to confirm, I am talking about the voxel scale, not the dungeon size.
This lead me to believe that this setting is doing more than just making regular scaling and maybe handling scaling collision shapes differently.
sorry for late reply, just saw this
voxel scale is just the scale of the grid boxes. if voxel scale is the same on the dungeon and on the rooms, as it should be, there will be no scaling that will happen. currently a warning is printed in console if they are different.
i.e. you should be designing your rooms based on the same grid voxel scale/size.
i would just consider completely erroring and and disallowing generation if they don't match exactly. it's possible there's some bug,, but im not keen to investigate a bug based on this edge case, when you shouldn't really be having different voxel scales at all. it warns you. i would rather just disallow this case entirely & error out in generation if it is causing bugs.
it's a different story if all dungeon rooms & dungeon generator's voxel scales match and it is still failing in generation.
Hello there,
amazing work on the plugin, having a blast using it and it works like a charm!
I was wondering about scaling of collision shapes being considers when room scaling is non-uniformly, since non-uniform scaling seems to be an issue for collisions shapes (going by the warning godot displays).
Is the room scaling applied on the collision shape and not on the Scale transform? Is it safe to use non-uniform scalings on rooms with collisions?
Thanks for your work!