vrld / HC

General purpose collision detection library for the use with LÖVE.
http://hc.readthedocs.org/
404 stars 48 forks source link

Added a function for raycasting. #68

Closed rzvxa closed 1 year ago

rzvxa commented 1 year ago

Added a function for easier raycasting. There is intersectionsWithRay and intersectsRay in shape class and intersectionsWithSegment in SpatialHash class, But there is no easy interface for doing a simple raycast up until a certain range so I ended up adding this to my fork of project, I think it can help others who want to use this library for all of their physics problems, Which is why I've made this PR. I'm going to add box cast and circle cast in future as my game progress. If you guys have any problems with the current implementation I've proposed, just tell me how you guys want it to be so i can do the refactoring. On another note, I'm going to maintain and add features to this library and make PRs for at least a year or two. if you guys wouldn't mind, It could be great if you remove the no longer maintained notice in the README so more people can use this project.

vrld commented 1 year ago

Thanks for the PR. I will not maintain code in this repo anymore, but we can link your fork in the readme. Does that sound good?

rzvxa commented 1 year ago

Thanks for the PR. I will not maintain code in this repo anymore, but we can link your fork in the readme. Does that sound good?

Hi, First I would like to thank you for this awesome project, It helped me a lot in building the foundation of my game. Linking my fork in the readme can do the trick, But wouldn't it be more useful to others If you let me maintain this project for a little while? To be honest I can work on the development fork and you can merge it to the master every now and then, Or you can grant me access to do so. I will always share my PRs with you before merging them and only proceed to do so if you approve the changes. This project doesn't need heavy development, the Math seems correct (at least in most places), and the interface is solid, There are not even any issues open on the subject, The Only issue I found was complaining about the class version which is not even a problem with the code itself. I'm sure we can easily keep this project maintained for at least a few more years. In case of contribution to this repository we can easily update hc.readthedocs.io too, But if we go the route of forking then this whole documentation link gets deprecated and we need to host hc on some other domain(either on readthedocs or GitHub itself)

Give it a thought and let me know what your decision is If you would like to either deprecate this fork and link mine or grant me access for contribution to this fork.

vrld commented 1 year ago

Great, I'll add you as contributor and remove the note in the README.

rzvxa commented 1 year ago

@vrld Thanks for the permission, I've taken the liberty of creating a development branch and merging this PR into development instead of directly into the master, This way I can both ensure stability and keep adding features before the next version release. I'll try to not bother you as much as possible, But if you wouldn't mind, I'll wait for your green light before any major change to the master branch.