Fix offset being gone after snapping to ground
This commit is contained in:
@@ -342,7 +342,7 @@ impl KinematicCharacterController {
|
|||||||
filter,
|
filter,
|
||||||
) {
|
) {
|
||||||
// Apply the snap.
|
// Apply the snap.
|
||||||
result.translation -= *self.up * (hit.toi - offset).max(0.0);
|
result.translation -= *self.up * (hit.toi - offset);
|
||||||
result.grounded = true;
|
result.grounded = true;
|
||||||
return Some((hit_handle, hit));
|
return Some((hit_handle, hit));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user