Skip to content

Smooth VUEs amendment#600

Merged
jerethk merged 1 commit into
TheForceEngine:masterfrom
jerethk:Smooth_vues_amendment
Jul 9, 2026
Merged

Smooth VUEs amendment#600
jerethk merged 1 commit into
TheForceEngine:masterfrom
jerethk:Smooth_vues_amendment

Conversation

@jerethk

@jerethk jerethk commented May 3, 2026

Copy link
Copy Markdown
Collaborator

The existing interpolation logic (introduced by #288) does not take into account the wrapping-around of angles at 360 degrees.
So, if an angle (eg. yaw) is 358 degrees in one frame and 2 degrees in the next frame, the interpolation will happen downwards from 358 to 2, instead of upwards (358, 359, 0, 1, 2).

This is not an issue with 3d-object VUEs, which ignore the angles and use the transformation matrix to render each keyframe. But it is noticed when using VUEs in camera mode, to move a camera or sprite around.

I think the solution to this is to test whether the delta is more than 180 degrees -- if so, interpolate via the shorter distance arc

…e is transiting across 0 / 360 degrees between frames

For example, if changing from 358 degrees to 2 degrees, we want to interpolate upwards (358, 359, 0, 1, 2) not downwards
@jerethk

jerethk commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator Author

NB. I ran this past @kevinfoley on discord (he wrote the original VUE smoothing code) and he said he was ok with it.

@jerethk jerethk requested a review from ifeldshteyn July 7, 2026 05:42

@ifeldshteyn ifeldshteyn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good - I talked to Kevin and I understand the issue this is trying to solve.

@jerethk jerethk merged commit 7df4a92 into TheForceEngine:master Jul 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants