-
Notifications
You must be signed in to change notification settings - Fork 0
Movement smoothing: Lerp between grid positions instead of instant snap #39
Copy link
Copy link
Closed
Labels
researchedAutomated research complete, ready for codingAutomated research complete, ready for coding
Description
Problem
When holding a movement key, the player snaps instantly between grid positions. Playtesters report this feels disorienting at speed because there is no visual transition — just a teleport each step.
Currently in player_3d.gd:
func update_visual_position() -> void:
"""Update 3D position to match grid position - SNAP instantly (turn-based!)"""
var world_pos = grid.grid_to_world(grid_position)
# TURN-BASED: Snap instantly to grid position, no lerping
global_position = world_posProposed Solution
Add a short visual lerp/tween between the old and new grid position when moving. The game logic remains fully grid-snapped and turn-based — this is purely a visual smoothing layer.
Approach Options
- Tween-based: On each move, create a brief tween (
~0.08-0.12s) that slidesglobal_positionfrom old to new. Simple, easy to tune. _processlerp: Track avisual_positionthat lerps toward the logicalgrid_positioneach frame. Smoother but needs a lerp speed constant.- Hybrid: Tween for single steps, faster/shorter tween when holding move to keep it snappy.
Considerations
- Must not slow down gameplay — the lerp duration should be short enough that held-move still feels fast
- Camera (first-person) moves with the player, so lerping the player position should automatically smooth the camera
- Turn execution timing may need adjustment so the next input is accepted after the lerp completes (or near-completes)
- Enemy/entity movement could benefit from the same treatment later
References
scripts/player/player_3d.gd—update_visual_position(),grid_positionscripts/player/states/executing_turn_state.gd— turn execution flowscripts/player/states/player_input_state.gd— input handling
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
researchedAutomated research complete, ready for codingAutomated research complete, ready for coding