-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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 volume cast intersection tests #11586
Conversation
out.mp4Here's a video of it working. The shapes are cast from the origin (purple point) in the direction of the line. The shapes (and their offset from the origin) can be seen at the origin. The casts only interact with shapes of the same type. When a collision happens it is shown as a green shape |
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.
Looks good implementation-wise, mainly some typos/copy errors.
I feel like the names could be made closer and more consistent though... There's RayTest2d
, with "Test" and the dimension at the end, and then there's Aabb2dCast
, with "Cast" and the dimension in the middle.
An "AABB test" sounds a bit ambiguous, so that can probably remain as "Cast". Maybe put the dimension at the end though, like AabbCast2d
? We could also use RayCast2d
, but that might imply more advanced functionality, not entirely sure
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.
Looks pretty good to me, tests seem solid as well!
# Objective - Add a basic form of shapecasting for bounding volumes ## Solution - Implement AabbCast2d, AabbCast3d, BoundingCircleCast, and BoundingSphereCast - These are really just raycasts, but they modify the volumes the ray is casting against - The tests are slightly simpler, since they just use the raycast code for the heavy lifting
Objective
Solution