Limit falling speed
Limit falling speed
Is there someway to limit how fast the player falls?
Creator of jelys_pizzaria and motorbike, and player of persistent kingdoms. RIP
- Skamiz Kazzarch
- Member
- Posts: 619
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
Re: Limit falling speed
I immagine you could use get_player_velocity() in globalstep to find out the current speed and if it's too fast use add_player_velocity() to slow the player down.
Relevant lua api: https://github.com/minetest/minetest/bl ... .txt#L5673
Though I suspect it would still be somewhat janky it would probably prevent these situations where you are falling several hundres of block per second.
Relevant lua api: https://github.com/minetest/minetest/bl ... .txt#L5673
Though I suspect it would still be somewhat janky it would probably prevent these situations where you are falling several hundres of block per second.
-
- Member
- Posts: 15
- Joined: Sat Oct 12, 2019 21:34
- In-game: warpnarget
Re: Limit falling speed
what if someone likes falling hundreds of blocks per second
- Linuxdirk
- Member
- Posts: 3219
- Joined: Wed Sep 17, 2014 11:21
- In-game: Linuxdirk
- Location: Germany
- Contact:
Re: Limit falling speed
Lower gravity by using the set_physics_override function for that player.
https://github.com/minetest/minetest/bl ... 5748-L5758
https://github.com/minetest/minetest/bl ... 5748-L5758
- Skamiz Kazzarch
- Member
- Posts: 619
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
Re: Limit falling speed
Derp, didn't even thought of that.
That should certainly slow down the initial fall, but will it stop it stop the player from acumulating those stupidly large speeds over large distances?
That should certainly slow down the initial fall, but will it stop it stop the player from acumulating those stupidly large speeds over large distances?
Who is online
Users browsing this forum: No registered users and 10 guests