Camera jitter
By observing the GridMovement, GridPosition and Transform components via inspector, I could narrow down that the camera jitter is only caused by the camera code itself.
I think its `camera.rs:177`: ` time.delta_seconds() * properties.camera_follow_snappiness,`, the s factor of the lerp.
s is supposed to go from 0 to 1 or vice versa. delta_seconds*snappiness is somewhere in the range of .11 and .12 on my machine, depending on how much calculation has been done the previous frame and how stable fps are.
I propse to add a lerp variable `t` that is reset on a transform change, clamped between 0 and 1 and will add + ` time.delta_seconds() * properties.camera_follow_snappiness,` every frame. There is a query filter `Changed<T>` with which you can detect changes.
I also propose to rename `CanBeFollowedByCamera` to `CameraFollowTarget`
关闭于 2024-07-23 1 条评论