tweak: updated the way the player body adjusts fov
This commit is contained in:
parent
5bd8b88376
commit
67d59a161d
2 changed files with 4 additions and 3 deletions
|
|
@ -30,9 +30,9 @@ void PlayerBody::on_child_entered(Node *node) {
|
|||
}
|
||||
|
||||
void PlayerBody::process(double delta) {
|
||||
GETSETM(this->camera, fov_factor, {
|
||||
fov_factor = Math::move_toward(fov_factor, target_fov, float(delta));
|
||||
});
|
||||
float const target_fov{ get_is_running() ? 1.25f : 1.0f };
|
||||
fov = Math::move_toward(fov, target_fov, float(delta * 2.0));
|
||||
this->camera->set_fov_factor(fov);
|
||||
}
|
||||
|
||||
void PlayerBody::physics_process(double delta) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue