Skip to content

feat: add snap vertical movement to XrNavigation script#8420

Merged
willeastcott merged 4 commits into
mainfrom
feat/xr-snap-vertical
Jan 29, 2026
Merged

feat: add snap vertical movement to XrNavigation script#8420
willeastcott merged 4 commits into
mainfrom
feat/xr-snap-vertical

Conversation

@willeastcott

Copy link
Copy Markdown
Contributor

Summary

  • Add snap vertical movement to XrNavigation for comfortable VR height adjustment
  • Uses right thumbstick Y-axis with hysteresis (same pattern as snap turning)
  • Hold right grip while snapping for boost mode (larger jumps)

New Controls

Input Action
Right thumbstick Y Snap up/down by 0.5m
Right grip + Right thumbstick Y Snap up/down by 2.0m (boost)

New Script Attributes

  • \enableSnapVertical\ - Toggle feature on/off (default: true)
  • \snapVerticalHeight\ - Height per snap (default: 0.5m)
  • \snapVerticalBoostHeight\ - Height when boosting (default: 2.0m)
  • \snapVerticalThreshold\ - Thumbstick threshold to trigger (default: 0.5)
  • \snapVerticalResetThreshold\ - Threshold to reset snap state (default: 0.25)

Why Snap Instead of Smooth?

Snap-based vertical movement is significantly more comfortable than continuous smooth movement because:

  1. Instant transitions don't cause vection (false sense of motion)
  2. Same pattern as snap turning which users are already familiar with
  3. No continuous motion = much less motion sickness

Test Plan

  • Test on Quest with controllers - verify right thumbstick Y snaps up/down
  • Test grip boost - verify larger snap height when holding right grip
  • Verify snap turning still works (right thumbstick X)
  • Verify XZ locomotion still works (left thumbstick)

Add snap vertical movement using right thumbstick Y-axis for VR navigation. This allows users to move up/down in discrete steps (like snap turning but for height), which is more comfortable than continuous smooth vertical movement.

New features:

- Right thumbstick Y: Snap up/down by 0.5m (configurable)

- Right grip + thumbstick Y: Snap up/down by 2.0m (boost mode)

- Uses same hysteresis system as snap turning

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds snap vertical movement to VR navigation, allowing users to quickly adjust their height in VR using the right thumbstick's Y-axis. The implementation follows the same hysteresis pattern as existing snap turning to prevent motion sickness and provide comfortable VR locomotion.

Changes:

  • Added snap vertical movement feature using right thumbstick Y-axis for instant up/down movement
  • Implemented boost mode via right grip button for larger vertical jumps (2.0m vs 0.5m)
  • Added five new configurable attributes for controlling snap vertical behavior (enable toggle, heights, thresholds)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/esm/xr-navigation.mjs Outdated
@willeastcott willeastcott merged commit e0391d2 into main Jan 29, 2026
7 checks passed
@willeastcott willeastcott deleted the feat/xr-snap-vertical branch January 29, 2026 15:02
@Maksims

Maksims commented Jan 29, 2026

Copy link
Copy Markdown
Collaborator

How to reset to XR's Y0?

@willeastcott

Copy link
Copy Markdown
Contributor Author

How to reset to XR's Y0?

There isn't a reset function at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: scripts area: xr XR related issue enhancement Request for a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants