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:
@@ -22,6 +22,8 @@ const ADT_TERRAIN_QUERY_SCRIPT := preload("res://src/gameplay/terrain/adt_terrai
|
||||
@export var sprint_multiplier: float = 6.0
|
||||
@export var flight_vertical_speed: float = 7.0
|
||||
@export var acceleration: float = 28.0
|
||||
## TrinityCore 3.3.5 player MOVE_TURN_RATE default, in radians per second.
|
||||
@export var keyboard_turn_speed_radians_per_second: float = 3.141594
|
||||
## Local composition profile. RenderSandbox preserves debug sprint/free flight;
|
||||
## Blizzlike335 rejects them but does not yet claim complete movement parity.
|
||||
@export_enum("RenderSandbox", "Blizzlike335") var movement_profile_id: String = "RenderSandbox"
|
||||
@@ -50,7 +52,7 @@ func set_terrain_query(terrain_query: TerrainQuery) -> void:
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
_player_input_source = PLAYER_INPUT_SOURCE_SCRIPT.new()
|
||||
_player_input_source = PLAYER_INPUT_SOURCE_SCRIPT.new(StringName(movement_profile_id))
|
||||
if _terrain_query == null:
|
||||
_terrain_query = ADT_TERRAIN_QUERY_SCRIPT.new(extracted_dir, map_name)
|
||||
_local_movement_controller = LOCAL_PLAYER_MOVEMENT_CONTROLLER_SCRIPT.new(
|
||||
@@ -60,7 +62,8 @@ func _ready() -> void:
|
||||
flight_vertical_speed,
|
||||
acceleration,
|
||||
sprint_multiplier,
|
||||
PLAYER_MOVEMENT_CAPABILITIES_SCRIPT.for_profile_id(StringName(movement_profile_id))
|
||||
PLAYER_MOVEMENT_CAPABILITIES_SCRIPT.for_profile_id(StringName(movement_profile_id)),
|
||||
keyboard_turn_speed_radians_per_second
|
||||
)
|
||||
_camera_rig = get_node_or_null(camera_pivot_path) as ThirdPersonCameraRig
|
||||
_appearance_presenter = get_node_or_null(visual_path) as CharacterAppearancePresenter
|
||||
@@ -96,6 +99,14 @@ func _unhandled_input(event: InputEvent) -> void:
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
var move_intent := _player_input_source.sample_move_intent()
|
||||
var yaw_delta_radians := _local_movement_controller.calculate_yaw_delta_radians(
|
||||
move_intent,
|
||||
delta
|
||||
)
|
||||
if not is_zero_approx(yaw_delta_radians):
|
||||
rotation.y += yaw_delta_radians
|
||||
if _camera_rig != null:
|
||||
_camera_rig.synchronize_yaw_from_character()
|
||||
var godot_world_movement_basis := global_basis
|
||||
if _local_movement_controller.is_flight_enabled and _camera_rig != null:
|
||||
godot_world_movement_basis = _camera_rig.godot_world_flight_movement_basis()
|
||||
|
||||
Reference in New Issue
Block a user