Skip to content

Implement wrist menu raycasting and trigger handling#1

Open
Barzbrown wants to merge 2 commits intomainfrom
codex/fix-interactivity-and-wrist-menu-visuals
Open

Implement wrist menu raycasting and trigger handling#1
Barzbrown wants to merge 2 commits intomainfrom
codex/fix-interactivity-and-wrist-menu-visuals

Conversation

@Barzbrown
Copy link
Owner

Summary

  • add canvas-labeled plane buttons for the wrist menu and keep references for raycasting
  • attach the wrist menu to the left controller pose and invoke per-frame raycast updates
  • introduce a right-hand laser ray, hover targeting, and trigger handling for tools and boards

Testing

  • not run

https://chatgpt.com/codex/tasks/task_e_68feeec995988326a4a6ac38fcee5675

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +121 to +123
if (!gamepad || !gamepad.buttons?.length) return false;
const button = gamepad.buttons[0];
return (button.value ?? button.pressed ? 1 : 0) > TRIGGER_THRESHOLD;

Choose a reason for hiding this comment

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

P1 Badge Trigger threshold logic always evaluates as pressed

The nullish/ternary expression button.value ?? button.pressed ? 1 : 0 is parsed as (button.value ?? button.pressed) ? 1 : 0, so any defined analog value (even 0) evaluates as truthy and the function returns true on every frame a gamepad exposes button.value. This means clicking tools or drawing strokes triggers immediately even when the trigger is not pulled past TRIGGER_THRESHOLD. The condition should compare the analog value (or a button.pressed fallback) to the threshold before converting to boolean.

Useful? React with 👍 / 👎.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant