-
-
Notifications
You must be signed in to change notification settings - Fork 27
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 functions #30
Comments
I don't know how the best pratices for raycasting are either, but I did develop one prototype for use with the Kontra game engine. Here's the link for the demo, with the link for the code inside: https://kontra-experiments.netlify.com/ |
Thanks for sharing! I will take a look. Hex Engine's raycasting requirements aren't exactly the same as Kontra's (since entities can be non-rectangular), but I can probably get some good inspiration from your |
Yo! Pretty new to game dev, so excuse my ignorance 😅. I've been doing some light research on collision detection. Would it be accurate to say that we'd want to support these three types of collision detection?
|
Yup, that sounds about right; though we'd also need to support collision between circles and polygons (and vice versa). But we can use circle-like polygons to do that, if needed. Thanks for the links! They'll be super helpful. Something else that may be useful is this library, which decomposes an arbitrary polygon into its convex pieces: https://github.com/schteppe/poly-decomp.js/ |
Hex Engine should include some ray-casting and collision detection functions out of the box, that use information from the Geometry component. I haven't written them already because I don't know much about ray-casting or which formulas are commonly used to implement it effectively. I would definitely appreciate some help with this.
The text was updated successfully, but these errors were encountered: