realtime-CSG-for-unity icon indicating copy to clipboard operation
realtime-CSG-for-unity copied to clipboard

UVs aren't updated when parent model is moved

Open SK83RJOSH opened this issue 2 years ago • 2 comments

I like to build my levels out of multiple models to keep the overall complexity down. This approach unfortunately has the drawback that when moving the base model, it's children don't have their UVs updated to match it's new world position.

https://user-images.githubusercontent.com/1371787/170689758-1161e06c-699e-4414-881d-2359494f9aa0.mp4

SK83RJOSH avatar May 27 '22 11:05 SK83RJOSH

Define "base model". Do you mean the CSG model, a group, or ? Texture lock forces UVs to be locked to the brush, regardless of where you move it. If you want to keep the world position of the textures, then try it without texture lock enabled.

nukeandbeans avatar May 27 '22 17:05 nukeandbeans

Define "base model". Do you mean the CSG model, a group, or ? Texture lock forces UVs to be locked to the brush, regardless of where you move it. If you want to keep the world position of the textures, then try it without texture lock enabled.

So my hierarchy is more or less as follows:

CSG Model (Level)
    CSG Brush
    CSG Brush

CSG Model (House)
    CSG Brush
    CSG Brush

With or without the lock, the UVs aren't actually in world space, they seem to actually be in the models local space. So if I move the model itself around, it's children's UVs do not get updated. Which causes issues when building a level out of multiple models. Sorry for the lack of clarity there. 🙂

I'm not sure if this is intended or not, it very may well be, but that's somewhat problematic since it leads to you needing to manually offset the UVs if you end up moving a model around and want things to line up. It's an incredibly pedantic thing, but something that felt like a bug and worth mentioning. 😅

SK83RJOSH avatar May 27 '22 18:05 SK83RJOSH