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

View offset is not saved while driving #52205

Merged
merged 1 commit into from
Oct 11, 2021

Conversation

RoyBerube
Copy link
Contributor

@RoyBerube RoyBerube commented Oct 9, 2021

Summary

Bugfixes "View offset is not saved while driving"

Purpose of change

Fixes #52136

The view offset would not be saved while driving, and on reloading a save the view offset would be centered incorrectly.

Describe the solution

Added save and load for the player's view offset.

Describe alternatives you've considered

Testing

Tested while driving a vehicle at 32 kph and saving and then loading.

Before: Offset is centered on player on reload. Stopping of the vehicle leaves the view offset in the wrong position. Press of the : key resets the view offset to the correct position on the player.

After: Offset correctly accounts for the vehicle speed on reload. On stopping the vehicle the offset is adjusted to the player. Press of : key has no effect because the offset has been handled correctly and is already centered on the player.

Additional context

@Maleclypse Maleclypse added the Controls / Input Keyboard, mouse, keybindings, input UI, etc. label Oct 9, 2021
@BrettDong BrettDong added the [C++] Changes (can be) made in C++. Previously named `Code` label Oct 10, 2021
@ZhilkinSerg ZhilkinSerg merged commit 67f4100 into CleverRaven:master Oct 11, 2021
@RoyBerube RoyBerube deleted the camera-center branch October 22, 2021 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Controls / Input Keyboard, mouse, keybindings, input UI, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Camera fails to center character when loading a game inside a moving vehicle
4 participants