beyond-all-reason / beyond-all-reason/RecoilEngine
Camera rotation is applied 1 (?) render frame before translation
- Dominant language
- C++
- Stars
- 679
- Forks
- 290
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 38
Description
I discussed this with @lhog already, but now reproduced with a minimal widget.
If programmatically setting the camera in mode 4, with both translation and rotation, the rotation is applied before the translation occurs. I suspect it's 1 frame ahead.
(Note there's also an issue with shadows not appearing for a frame after translating, in this version of the engine (ZK current), but @lhog already fixed that)
Recording a video at sufficient frame rate with the following widget should show the problem, or watch the attached example.



[camerarot.zip](https://github.com/beyond-all-reason/spring/files/11038379/camerarot.zip)
[2023-03-22 09-18-50.zip](https://github.com/beyond-all-reason/spring/files/11038410/2023-03-22.09-18-50.zip)
Contributor guide
Research direction
Start by reproducing the camera update with the attached camerarot.zip minimal widget and compare translation and rotation across render frames. Trace the camera update and render timing until the ordering is clear; done means programmatic translation and rotation are applied in the same frame without the reported one-frame mismatch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100