This pull request includes several changes to the mouse steering functionality and related classes in the project. The primary focus is on improving the linearity and smoothness of the steering, adding new methods, and refining existing logic for better performance and accuracy.
Improvements to Mouse Steering:
src/MouseSteering.lua: Added bezier, applyLinearity, and reverseLinearity methods to improve the calculation of steering adjustments. The applyLinearity method now uses a Bezier curve for more precise control.
Enhancements in Vehicle Camera Extension:
src/misc/VehicleCameraExtension.lua: Modified the canSteerWithMouse function to check if the vehicle is rotating, and adjusted the actionEventLookLeftRight method for better responsiveness.
This pull request includes several changes to the mouse steering functionality and related classes in the project. The primary focus is on improving the linearity and smoothness of the steering, adding new methods, and refining existing logic for better performance and accuracy.
Improvements to Mouse Steering:
src/MouseSteering.lua
: Addedbezier
,applyLinearity
, andreverseLinearity
methods to improve the calculation of steering adjustments. TheapplyLinearity
method now uses a Bezier curve for more precise control.Enhancements in Vehicle Camera Extension:
src/misc/VehicleCameraExtension.lua
: Modified thecanSteerWithMouse
function to check if the vehicle is rotating, and adjusted theactionEventLookLeftRight
method for better responsiveness.Updates to Mouse Steering Vehicle Specialization:
src/specializations/vehicles/MouseSteeringVehicle.lua
: AddedgetAxisSideForSteeringSync
function and updated event listeners. TheonUpdate
method now includes checks for vehicle control and rotation status. [1] [2] [3] [4] [5]Code Refinements:
src/specializations/vehicles/MouseSteeringVehicle.lua
: RefinedupdateSteering
to use new linearity and smoothness calculations, and updatedisHudVisible
to account for AI control and motor status. [1] [2]These changes collectively enhance the steering mechanics, improve code readability, and ensure more accurate and responsive vehicle control.