Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have created a Lua function which allows scripting the player's camera. You specify a position offset, rotation offset, FOV multiplier, and transition time. Additionally you can specify whether that's a third person viewpoint, in which case the wielded item is hidden and the player can see their own model.
One practical use is allowing players of different sizes to have a correct eye position... so a server can offer both giant and midget player models, while this makes it possible to define a proper camera height for each. Another is vehicles, which can now setup a behind view like any racing game when entered. Also beds, for which you can offset the location and rotation of the camera to make it look like you're laying down. It can also be used to change the FOV as an effect for specific actions... like being underwater or running. Many more uses can probably be found.
Note that this might invalidate existing "third person camera" patches, as it adds the ability to have a 3rd person camera but with a lot more features... no harm meant to the authors of those patches, since a choice between this and them might have to be taken. Also note that the local player model is still networked and will visually lag like any player on the server, which can probably be fixed later.