Skip to content

Commit 00a6878

Browse files
willeastcottclaude
andcommitted
Upgrade XrNavigation teleport visuals to ballistic arc with ring indicator
Replaces the line-based teleport visualization with a modern, Quest-style presentation, with no physics-engine dependency: - Teleport aim is now a ballistic parabolic arc rendered as a glowing soft-edged ribbon mesh (camera-billboarded, alpha-faded edges/ends), with a shader-drawn glowing ring at the landing point - Ground detection uses a configurable groundHeight plane (was hardcoded y=0), plus an optional castRay callback so apps with physics or custom picking can supply real ground detection; elevated hits step the rig up/down correctly - Teleport commit and visualization share the same arc computation, so landings match the visual exactly (also fixes teleporting beyond maxTeleportDistance while the ray showed invalid) - Aim originates from the grip position when available - the target ray origin sits at the head for gaze/pinch input (e.g. Apple Vision Pro) - Shaders provided in GLSL and WGSL (WebGL2 + WebGPU) - Holds a refcount on the shared ring mesh so transient input sources (one per pinch on visionOS) cannot destroy it on removal - Removes the always-on white controller rays and the line-circle indicator; removes controllerRayColor and teleportIndicatorSegments - Softer default colors (cyan-white valid, muted salmon invalid) - Cleans up all event handlers, meshes and materials on script destroy New attributes: groundHeight, teleportArcSpeed, arcWidth, arcSegments. New property: castRay. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 1a94334 commit 00a6878

1 file changed

Lines changed: 534 additions & 93 deletions

File tree

0 commit comments

Comments
 (0)