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

Cast ray from any given point on screen, not just from the pointer position #511

Open
2 tasks done
CabeDigicorp opened this issue Oct 14, 2024 · 0 comments
Open
2 tasks done
Labels
feature Something new that we could do

Comments

@CabeDigicorp
Copy link

CabeDigicorp commented Oct 14, 2024

Description 📝

Currently, the SimpleRaycaster.castRay() method casts a ray from the camera to the mouse or touch event point. There is no way to override the mouse/touch position and cast to a point defined by its (x,y) on-screen coordinates.

Suggested solution 💡

In the Core module, modify the SimpleRaycaster.castRay() method so that it accepts an optional parameter of type Vector2. If that parameter has a value, use it as the raycasting point; otherwise, use the mouse/touch position as in the current implementation.

Alternative ⛕

No response

Additional context ☝️

Discussed here: https://people.thatopen.com/c/ask-the-community/raycaster-problem

Validations ✅

  • Read the docs.
  • Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.
@CabeDigicorp CabeDigicorp added the feature Something new that we could do label Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Something new that we could do
Projects
None yet
Development

No branches or pull requests

1 participant