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

Add raycasting to add interaction through mouse or touch #20

Open
jaronwanderley opened this issue Aug 11, 2023 · 2 comments
Open

Add raycasting to add interaction through mouse or touch #20

jaronwanderley opened this issue Aug 11, 2023 · 2 comments

Comments

@jaronwanderley
Copy link

I don't know how to implement a raycasting using W, there is some functionality to assist with raycasting?.
Raycasting is used for mouse picking (working out what objects in the 3d space the mouse is over) amongst other things.
If hasn't some function, could u implement it or guide on a way to add it on the W?

@xem
Copy link
Owner

xem commented Aug 11, 2023

Hi! I'm afraid I won't be available to add this feature in the following month(s) because I'll be attending js13kgames (a js game jam) and work on several other projects after that.
Though it's a very nice idea, to let the scene objects have click or even drag capabilities, so I'm adding it in my backlog :)
In the meantime, if you're in a hurry, my WebGL guide (https://xem.github.io/articles/webgl-guide.html) explains how to do webgl from scratch, including mouse controls (in the part 2 - https://xem.github.io/articles/webgl-guide-part-2.html), and W.js is entirely inspired by that guide, so I would advise you to read it and use it to suit your needs (even without using W at all if it's simpler).
Cheers!

@jaronwanderley
Copy link
Author

thank u, I'll read it! I found this Library to add mouse control on webgl called glMouse, first I'll read your tutorial and try to implement using W or just webgl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants