Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

`FaceControls[orbit]ˋ #2257

Open
abernier opened this issue Dec 7, 2024 · 0 comments
Open

`FaceControls[orbit]ˋ #2257

abernier opened this issue Dec 7, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request feature request

Comments

@abernier
Copy link
Member

abernier commented Dec 7, 2024

Describe the feature you'd like:

An orbit prop option so FaceControls faces the normal of intersects[0]1

Suggested implementation:

  1. compute intersects[0] with a raycaster (set to origin: facemesh's pos / dir: facemesh's sight dir)
  2. get normal vec in world coordinates
  3. damp the camera's
    • position to intersects[0] + normal.scalar(radius)
    • lookAt to the intersects[0]

Options:

  • control the radius (with head inclination or thumb-index length)

Refs:

Demo

Footnotes

  1. intersects from raycaster.set(facemesh.position, facemesh.dir)

@abernier abernier added the enhancement New feature or request label Dec 7, 2024
@abernier abernier self-assigned this Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature request
Projects
None yet
Development

No branches or pull requests

1 participant