From 85fe80a717ccb36c1d766f22538fa886d28337f3 Mon Sep 17 00:00:00 2001 From: Kyzzsa <53786793+Kyzzsa@users.noreply.github.com> Date: Sat, 6 Jun 2026 21:51:36 +0800 Subject: [PATCH] Fix velocity calculation in shape casting --- src/query/shape_cast/shape_cast.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/query/shape_cast/shape_cast.rs b/src/query/shape_cast/shape_cast.rs index bc2b6713..bbb6faff 100644 --- a/src/query/shape_cast/shape_cast.rs +++ b/src/query/shape_cast/shape_cast.rs @@ -279,6 +279,6 @@ pub fn cast_shapes( options: ShapeCastOptions, ) -> Result, Unsupported> { let pos12 = pos1.inv_mul(pos2); - let vel12 = pos1.rotation.inverse() * vel2 - vel1; + let vel12 = pos1.rotation.inverse() * (vel2 - vel1); DefaultQueryDispatcher.cast_shapes(&pos12, vel12, g1, g2, options) }