Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix actor mtx interpolation flag persisting through skipped frames #903

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,10 @@ void FrameInterpolation_StartRecord(void) {
current_recording = {};
current_path.clear();
current_path.push_back(&current_recording.root_path);
has_inv_actor_mtx = false;
interpolate_wider_angles = false;
ignore_inv_actor_mtx = false;

if (!camera_interpolation) {
// default to interpolating
camera_interpolation = true;
Expand Down Expand Up @@ -523,12 +527,16 @@ int FrameInterpolation_GetCameraEpoch(void) {
// Marks the current record path and its children to not apply the matrix result
// against the recorded actor inverted matrix
void FrameInterpolation_IgnoreActorMtx() {
if (!is_recording)
return;
ignore_inv_actor_mtx = true;
ignore_inv_actor_mtx_path_index = current_path.size();
}

// Allows interpolating from angle changes that are up to 123º for the next SetTranslateRotateYXZ
void FrameInterpolation_InterpolateWiderAngles() {
if (!is_recording)
return;
interpolate_wider_angles = true;
}

Expand Down
Loading