Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Joystick sensitivity for player movement (#11262)
This commit deprecates the forward, backward, left, and right binary inputs currently used for player movement in the PlayerControl struct. In their place, it adds the movement_speed and movement_direction values, which represents the player movement is a polar coordinate system. movement_speed is a scalar from 0.0 to 1.0. movement_direction is an angle from 0 to +-Pi: FWD 0 _ LFT / \ RGT -Pi/2 | | +Pi/2 \_/ +-Pi BCK Boolean movement bits will still be set for server telegrams and Lua script invocations to provide full backward compatibility. When generating these values from an analog input, a direction is considered active when it is 22.5 degrees away from either orthogonal axis. Co-authored-by: Markus Koch <email@example.com> Co-authored-by: sfan5 <firstname.lastname@example.org>
- Loading branch information
Showing with 138 additions and 99 deletions.
- +3 −4 src/client/content_cao.cpp
- +40 −37 src/client/game.cpp
- +43 −0 src/client/inputhandler.h
- +21 −3 src/client/joystick_controller.cpp
- +4 −1 src/client/joystick_controller.h
- +4 −20 src/client/localplayer.cpp
- +0 −4 src/network/serverpackethandler.cpp
- +7 −18 src/player.h
- +12 −8 src/script/lua_api/l_localplayer.cpp
- +4 −4 src/script/lua_api/l_object.cpp
There are no files selected for viewing
Oops, something went wrong.