Skip to content

Movement smoothing: Lerp between grid positions instead of instant snap #39

@aebrer

Description

@aebrer

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_pos

Proposed 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

  1. Tween-based: On each move, create a brief tween (~0.08-0.12s) that slides global_position from old to new. Simple, easy to tune.
  2. _process lerp: Track a visual_position that lerps toward the logical grid_position each frame. Smoother but needs a lerp speed constant.
  3. 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.gdupdate_visual_position(), grid_position
  • scripts/player/states/executing_turn_state.gd — turn execution flow
  • scripts/player/states/player_input_state.gd — input handling

Metadata

Metadata

Assignees

No one assigned

    Labels

    researchedAutomated research complete, ready for coding

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions