mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Swing the camera down when the player lands on the ground, based on the velocity the surface is hit with.
This commit is contained in:
parent
17cfb1850d
commit
7cd5eb4c77
4 changed files with 34 additions and 2 deletions
|
@ -329,6 +329,9 @@ void LocalPlayer::move(f32 dtime, ClientEnvironment *env, f32 pos_max_d,
|
|||
if(!touching_ground_was && touching_ground){
|
||||
MtEvent *e = new SimpleTriggerEvent("PlayerRegainGround");
|
||||
m_gamedef->event()->put(e);
|
||||
|
||||
// Set camera impact value to be used for view bobbing
|
||||
camera_impact = getSpeed().Y * -1;
|
||||
}
|
||||
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue