You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reproducible on Godot 4 and up. Not tested on Godot 3 and lower
System information
Godot v4.3.dev3.mono - macOS 14.2.0 - Vulkan (Forward+) - integrated Apple M2 - Apple M2 (8 Threads)
Issue description
Setting position_smoothing_speed to a negative value causes Camera2D to infinitely accelerate away from its follow target.
While it's possible that some users may make use of this behavior intentionally, this appears to be undefined behavior with camera smoothing.
Screen.Recording.2024-04-02.at.6.06.49.PM.mov
Steps to reproduce
Attach a Camera2D as a child of a moving Node2D
Set position_smoothing_speed to a negative value.
Minimal reproduction project (MRP)
Issue reproduction is trivial. If you absolutely need a project, you can download the 2D platformer demo from the Asset Library and follow the steps to reproduce (open the player scene and change position_smoothing_speed on the child Camera2D)
The text was updated successfully, but these errors were encountered:
While a simple fix could be to bound the minimum value to zero, I'd like to see negative values allow the camera to move ahead of its target momentum rather than lag behind it. Although this would be more difficult to implement than just setting a minimum value since it would require keeping track of its target's momentum, this is the behavior I was attempting to achieve.
I think it'd be better to first fix this by giving it a minimum, then make an improvement ticket/proposal so we can discuss how we want it to work. We're already pretty confident this is how we don't want it to work. 😬
I agree thre should be a minium but I disagree on the negative value having any possible meaning. The value here is the speed at which the camera position go to the nodes position. obviously without any check negative value would move away from the position which leads to this strange behaviour. All of this to say I don't see how negative value would work and I don't think they should be allowed.
Tested versions
Reproducible on Godot 4 and up. Not tested on Godot 3 and lower
System information
Godot v4.3.dev3.mono - macOS 14.2.0 - Vulkan (Forward+) - integrated Apple M2 - Apple M2 (8 Threads)
Issue description
Setting position_smoothing_speed to a negative value causes Camera2D to infinitely accelerate away from its follow target.
While it's possible that some users may make use of this behavior intentionally, this appears to be undefined behavior with camera smoothing.
Screen.Recording.2024-04-02.at.6.06.49.PM.mov
Steps to reproduce
Minimal reproduction project (MRP)
Issue reproduction is trivial. If you absolutely need a project, you can download the 2D platformer demo from the Asset Library and follow the steps to reproduce (open the player scene and change position_smoothing_speed on the child Camera2D)
The text was updated successfully, but these errors were encountered: