godotengine / godotengine/godot

False velocity values on moving elements when camera reaches a stop

Open
#96,041 0 comments 2 reactions 0 assignees View on GitHub
bug topic:3d topic:rendering
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

- Reproductible in 4.3

### System information

Windows 10

### Issue description

When active camera reaches a stop, objects' velocities in the velocity buffer appear to be moving according to their previous frame's transform difference, the most obvious case of which is on objects that are children of the camera and stay stationary in relation to it, still showcasing false velocities the moment the camera stops, i.e. the the first frame the camera's current frame's and last frame's transforms match after it has been moving. It seems to be an issue specifically around the camera reaching a stop, as otherwise it would occur on any change of direction that it makes

### Steps to reproduce

download the small minimum reproduction project.
play motion_blur_test.tscn
press up and down arrows to cycle through different framerates, ideally press up once to be at the lowest 2 fps.
move with WASD, and then stop moving, you will see the cube that moves with the camera gets blurred on the frame the camera stopped.

press z to open the debug view, and you will see at the bottom right the velocity buffer and a non blurred color buffer at the top left. Repeat the same steps to see the velocity buffer in those instances. you may need to change directions for the velocities to be positive and show up.

note how the extra velocities only happen when the camera stops, not when changing directions abruptly

### Minimal reproduction project (MRP)

[godot-velocity-bug-minimum-reproduction.zip](https://github.com/user-attachments/files/16737779/godot-velocity-bug-minimum-reproduction.zip)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.