-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Physics override not working properly when speed is set to 0 while moving #10037
Comments
Is this just how it appears to the client, or does the server actually register the player as moving? I'm betting on the former, as you mention |
The reason for this is that setting speed to zero not only prevents acceleration but also deceleration (parameters here).
Note the these methods do nothing for players. |
IMO not a bug as velocity should be kept. You can use |
I'm inclined to agree. However, when sleeping for example, your speed is
set to zero. However, now that a punching player can apply velocity to
your character, there's no guarantee you'll stay situated sleeping in the
bed. Just food for thought.
…On Thu, Jun 18, 2020 at 8:43 AM Lars Müller ***@***.***> wrote:
IMO not a bug as velocity should be kept. You can use player:add_velocity(vector.multiply(player:get_player_velocity(),
-1)) BTW.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#10037 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFS4UYSDODPXK3NYITAQ56DRXIDWNANCNFSM4N5VQAUQ>
.
|
I don't agree as it's pretty unintuitive. I'd expect to have the player unable to move if I set speed = 0 |
set/add velocity does not work for players. |
It does (used to be called
true |
Oh, sorry, I was looking at outdated (0.4) documentation. Back in the day there was truly no way to manipulate player velocity, which was pretty frustrating. |
Back in the day modders would temporarily attach players to entities to move them :'-) |
Fixes luanti-org#10037. Why the overridden speed is used as a coefficient to calculate accelaration?
Fixes luanti-org#10037. Why the overridden speed is used as a coefficient to calculate acceleration?
For backwards compatibility, we can't change the behavior of the Fortunately, with #11465 already merged and #13815 hopefully coming soon, you will be able to control all speed values separetely (using player:set_physics_override({
speed = 0,
}) with player:set_physics_override({
speed = 1,
speed_walk = 0,
speed_climb = 0,
speed_crouch = 0,
speed_fast = 0,
-- The following is optional and causes the player to stop immediately
-- instead of coming to a halt more slowly.
acceleration_default = math.huge,
acceleration_air = math.huge,
acceleration_fast = math.huge,
}) However, #13796 could still be an option to make the behavior of |
Minetest version
Summary
Trying to set
doesn't work properly while a movement key is held down (players slide in the last direction they were moving to). I've tried with set_velocity and set_acceleration equal to {x=0,y=0,z=0} but again no luck
Steps to reproduce
Overrides physics to 0 while moving
The text was updated successfully, but these errors were encountered: