-
-
Notifications
You must be signed in to change notification settings - Fork 899
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
feat!: Raycasting and raytracing #1785
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps it would make sense to try to split this PR into several smaller ones, so that they are easier to review, and they are better reflected in the change log? For example, the Ray2 class can probably be introduced in a standalone PR; similarly some new methods for the Vector2 class.
|
I've tried running the example - and it turned out to be extremely laggy when I move the mouse. render
render
render
render
render
render
render
render
render
render
render
render
render
render
render
render
render
casting
render
render
render
render
render
casting
casting
render
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
render
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
render
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting
casting Recommendation: accumulate the results of mouse moves in a variable, and then process the them all at once during the |
Fixed that! And broke something else, seems like something is wrong with the broadphase now. 😅 |
f7b0bee
to
f8ebd83
Compare
6178e78
to
09ff0f6
Compare
The |
Co-authored-by: Pasha Stetsenko <stpasha@google.com>
Description
This PR implements raytracing and raycasting for the built-in hitboxes.
Depends on #1787 and #1788
Left to do:
Checklist
fix:
,feat:
,docs:
etc).docs
and added dartdoc comments with///
.examples
.Breaking Change
Migration instructions
If you pass in your own collision detection system to the
HasCollisionDetection
mixin you have to change the signature of that to:CollisionDetection<ShapeHitbox>
instead ofCollisionDetection<Hitbox>
.Related Issues