Closed FlowLightGames closed 1 month ago
I think I saw similar effect not only with tilemap. Changing camera offset instead of position solves this jitter.
I think I saw similar effect not only with tilemap. Changing camera offset instead of position solves this jitter.
tried manually tweening camera offset and not using the position smoothing. Same problem.
I looked at your project and it seems you have Snap 2D Verticies to Pixel
turned on by mistake. If you turn that off, you shouldn't have any issues.
I looked at your project and it seems you have
Snap 2D Verticies to Pixel
turned on by mistake. If you turn that off, you shouldn't have any issues.
the 4.2.2 version also has snap 2d vertices to Pixel enabled and does not have this issue. it happens at a reduced the frequency, but it still happens.
Did you see something that recommended you have them both on? We should correct it if so. In both versions you shouldn't have Snap 2D Vertices to Pixel
turned on at all and definitely not with Snap 2D Transforms to Pixel
on at the same time. IIRC Snap 2D Vertices to Pixel
was added very early on in the 4.0 development as a work around while we were trying to figure out pixel snap in general, and will be deprecated in the future... but someone can correct me if I'm mis-remembering.
Either way Snap 2D Transforms to Pixel
should be all you need!
Edit: Actually, it looks like the docs already recommends against Snap 2D Vertices to Pixel
so we should be good on that front:
Did you see something that recommended you have them both on? We should correct it if so. In both versions you shouldn't have
Snap 2D Vertices to Pixel
turned on at all and definitely not withSnap 2D Transforms to Pixel
on at the same time. IIRCSnap 2D Vertices to Pixel
was added very early on in the 4.0 development as a work around while we were trying to figure out pixel snap in general, and will be deprecated in the future... but someone can correct me if I'm mis-remembering.Either way
Snap 2D Transforms to Pixel
should be all you need!
I tried all permutations of those 2 settings. still there
Oh that's weird. Can you upload an MRP with this issue? I can't reproduce the issue in the MRP you provided. All I did was turn off Snap 2D Vertices to Pixel
and it's working as expected.
https://github.com/user-attachments/assets/9830da8c-9113-459b-950a-06ec6b70a287
Oh that's weird. Can you upload an MRP with this issue? I can't reproduce the issue in the MRP you provided. All I did was turn off
Snap 2D Vertices to Pixel
and it's working as expected.2024-08-16.09-56-36.mp4
might be hardware dependent or because here (seconds 15-17) its because the movement is not as smooth as in mrp, ill add a mrp with more sudden movements rn:
https://github.com/user-attachments/assets/a23932e4-08aa-4412-a106-df75a507d489
Ah I see! I guess this isn't a regression since the docs warn against using anything except Snap 2D Transforms to Pixels
, so any combination of the two would result in unsupported behavior. However, I definitely would not expect there to be glitches with just Snap 2D Transforms to Pixels
enabled, so it's certainly a bug we should check out ASAP. It's hard to tell if this is an issue with tiles or with snapping though, so if you can make a small MRP that can exhibit that we should be able to get to the bottom of it. I see you're using an Nvidia card, and remember there being issues with Nvidia in the past, but luckily I also have an Nvidia card so I should be able to reproduce it if you can. Let us know and we'll try to get this fixed! Thanks for your help.
Ah I see! I guess this isn't a regression since the docs warn against using anything except
Snap 2D Transforms to Pixels
, so any combination of the two would result in unsupported behavior. However, I definitely would not expect there to be glitches with justSnap 2D Transforms to Pixels
enabled, so it's certainly a bug we should check out ASAP. It's hard to tell if this is an issue with tiles or with snapping though, so if you can make a small MRP that can exhibit that we should be able to get to the bottom of it. I see you're using an Nvidia card, and remember there being issues with Nvidia in the past, but luckily I also have an Nvidia card so I should be able to reproduce it if you can. Let us know and we'll try to get this fixed! Thanks for your help.
trying to reproduce it I found a stray subviewport that was still using the Snap 2D Vertices to Pixel, causing the issue. Sorry 😳
Oh no worries! If you find anything else, please let us know! We put a lot of love into trying to get pixel-perfect snapping right, so it's important to get to the bottom of these issues as they come up. We really should create a tutorial for different setups too.
To be honest the fact that these two snapping properties are separate and have not been merged into the same enumeration feels weird to me. If using both is highly discouraged, it shouldn't even be possible or at the very least warned about on startup.
@FlowLightGames Is your problem resolved? If so, would you mind closing the ticket?
Similar to 96256, this is fixed by just using snap_2d_transforms_to_pixel
, but https://github.com/godotengine/godot/pull/97260 also fixed snap_2d_vertices_to_pixel
as well. Tested with the original MRP and can't reproduce in either case now.
Tested versions
-reproducible in 4.3 -not reproducible in 4.2.2
System information
Godot v4.3.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4080 SUPER (NVIDIA; 31.0.15.5186) - AMD Ryzen 7 7800X3D 8-Core Processor (16 Threads)
Issue description
when using camera smoothing (and both pixel snapping options, but they dont make a difference for me) it appears the tiles in the tilemap are not snapped correctly? or lagging behind. This was not a problem in 4.2.2 stable. 4.3: 4.2.2:
Steps to reproduce
make a new project, (enable both pixel snap option but they didnt make a difference for me), make a tileset (in this example isometric), move camera and let the position smoothing do its thing.
Minimal reproduction project (MRP)
New Compressed (zipped) Folder.zip the folder contains a "4.2.2" project and "bugreport" both nearly identical setups, but the bug only happens in the bugreport (4.3) project not in the 4.2.2 stale one. in the projects move the camera with the arrow buttons (then stopping for the position smoothing).