1
0
NeroBurner 1d69a23ba4
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 <markus@notsyncing.net>
Co-authored-by: sfan5 <sfan5@live.de>
2021-08-27 20:24:24 +02:00
..
2020-04-11 13:12:51 +02:00
2020-04-11 13:12:51 +02:00
2017-08-17 22:19:39 +02:00
2020-11-01 12:52:14 +01:00
2020-04-11 13:12:51 +02:00
2018-06-27 17:45:40 +02:00
2020-10-22 16:18:01 +01:00
2017-08-17 22:19:39 +02:00
2017-08-17 22:19:39 +02:00