Fix offset being gone after snapping to ground

This commit is contained in:
Jan Nils Ferner
2023-01-26 23:02:36 +01:00
parent d5946f623b
commit c3b0bde6b2

View File

@@ -342,7 +342,7 @@ impl KinematicCharacterController {
filter,
) {
// Apply the snap.
result.translation -= *self.up * (hit.toi - offset).max(0.0);
result.translation -= *self.up * (hit.toi - offset);
result.grounded = true;
return Some((hit_handle, hit));
}