-
Notifications
You must be signed in to change notification settings - Fork 394
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 shapecasts + raycasts #5440
base: master
Are you sure you want to change the base?
Add shapecasts + raycasts #5440
Conversation
Actual raycasts. Need this for AI LIDAR experiment.
Coincidentally, I started to take a look at the raycast end of this recently (https://github.com/eoineoineoin/RobustToolbox/commits/eoin/2024.09.xx.raycasts/) - I took a slightly different approach of putting a castray() function on the shapes interface which is a bit clearer IMO (though, that strategy doesn't work for shapecasts). If you want to run with this, that's fine, I'll leave it - I still had to finish some functions, had a bunch of todos, polish, and tests to do, but I did notice a few issues with the SharedPhysicsSystem.Queries.cs which would also be good to include. |
/// Gets the position of the Matrix. Will have some precision loss. | ||
/// </summary> | ||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | ||
public static Vector2 Position(this Matrix3x2 t) |
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.
Not sure what you mean by "precision loss", but this method already exists (Matrix3x2.Translation), so no need for it (along with the tests).
I'm porting the new C code from box2d. |
Actual raycasts. Need this for AI LIDAR experiment.