gmp(M02): add 3.3.5 input profile
Work-Package: M02-GMP-INPUT-PROFILE-335-001 Agent: sindo-main-codex Tests: player input/movement/capability/terrain/camera/presentation, coordinate/streaming, docs/coordination and renderer dry-run passed Fidelity: build-12340 binding hashes and selected defaults pinned; TrinityCore turn rate and WoWee mouse routing are compatibility references with explicit limits
This commit is contained in:
@@ -23,6 +23,7 @@ var _strafe_speed_units_per_second: float
|
||||
var _flight_vertical_speed_units_per_second: float
|
||||
var _acceleration_units_per_second_squared: float
|
||||
var _sandbox_sprint_multiplier: float
|
||||
var _keyboard_turn_speed_radians_per_second: float
|
||||
var _movement_capabilities: PlayerMovementCapabilities
|
||||
var _godot_world_velocity_units_per_second := Vector3.ZERO
|
||||
var _is_flight_enabled := false
|
||||
@@ -38,7 +39,8 @@ func _init(
|
||||
flight_vertical_speed_units_per_second: float,
|
||||
acceleration_units_per_second_squared: float,
|
||||
sandbox_sprint_multiplier: float,
|
||||
movement_capabilities: PlayerMovementCapabilities = null
|
||||
movement_capabilities: PlayerMovementCapabilities = null,
|
||||
keyboard_turn_speed_radians_per_second: float = PI
|
||||
) -> void:
|
||||
_run_speed_units_per_second = run_speed_units_per_second
|
||||
_backward_speed_units_per_second = backward_speed_units_per_second
|
||||
@@ -46,6 +48,10 @@ func _init(
|
||||
_flight_vertical_speed_units_per_second = flight_vertical_speed_units_per_second
|
||||
_acceleration_units_per_second_squared = acceleration_units_per_second_squared
|
||||
_sandbox_sprint_multiplier = sandbox_sprint_multiplier
|
||||
_keyboard_turn_speed_radians_per_second = maxf(
|
||||
keyboard_turn_speed_radians_per_second,
|
||||
0.0
|
||||
)
|
||||
_movement_capabilities = (
|
||||
movement_capabilities
|
||||
if movement_capabilities != null
|
||||
@@ -53,6 +59,16 @@ func _init(
|
||||
)
|
||||
|
||||
|
||||
## Returns the Godot yaw delta for one signed keyboard-turn request.
|
||||
## Positive intent turns right, which is negative rotation around Godot +Y.
|
||||
func calculate_yaw_delta_radians(move_intent: MoveIntent, delta_seconds: float) -> float:
|
||||
return (
|
||||
-move_intent.turn_axis
|
||||
* _keyboard_turn_speed_radians_per_second
|
||||
* maxf(delta_seconds, 0.0)
|
||||
)
|
||||
|
||||
|
||||
## Toggles sandbox free flight and clears velocity when the profile permits it.
|
||||
## Returns the resulting state; rejected compatibility-profile requests return false.
|
||||
func toggle_sandbox_flight() -> bool:
|
||||
|
||||
Reference in New Issue
Block a user