mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix camera "jumping" when attached and the parent goes too fast
This commit is contained in:
parent
f85c1165c2
commit
c1bf6f9f7a
4 changed files with 8 additions and 0 deletions
|
@ -218,6 +218,8 @@ void Camera::update(LocalPlayer* player, f32 frametime, v2u32 screensize,
|
|||
// Smooth the movement when walking up stairs
|
||||
v3f old_player_position = m_playernode->getPosition();
|
||||
v3f player_position = player->getPosition();
|
||||
if (player->isAttached && player->parent)
|
||||
player_position = player->parent->getPosition();
|
||||
//if(player->touching_ground && player_position.Y > old_player_position.Y)
|
||||
if(player->touching_ground &&
|
||||
player_position.Y > old_player_position.Y)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue