Stop shape cast at penetration
This commit is contained in:
@@ -229,7 +229,7 @@ impl KinematicCharacterController {
|
|||||||
&translation_dir,
|
&translation_dir,
|
||||||
character_shape,
|
character_shape,
|
||||||
translation_dist + offset,
|
translation_dist + offset,
|
||||||
false,
|
true,
|
||||||
filter,
|
filter,
|
||||||
) {
|
) {
|
||||||
// We hit something, compute the allowed self.
|
// We hit something, compute the allowed self.
|
||||||
@@ -338,7 +338,7 @@ impl KinematicCharacterController {
|
|||||||
&-self.up,
|
&-self.up,
|
||||||
character_shape,
|
character_shape,
|
||||||
snap_distance + offset,
|
snap_distance + offset,
|
||||||
false,
|
true,
|
||||||
filter,
|
filter,
|
||||||
) {
|
) {
|
||||||
// Apply the snap.
|
// Apply the snap.
|
||||||
@@ -571,7 +571,7 @@ impl KinematicCharacterController {
|
|||||||
&self.up,
|
&self.up,
|
||||||
character_shape,
|
character_shape,
|
||||||
max_height,
|
max_height,
|
||||||
false,
|
true,
|
||||||
filter,
|
filter,
|
||||||
)
|
)
|
||||||
.is_some()
|
.is_some()
|
||||||
@@ -588,7 +588,7 @@ impl KinematicCharacterController {
|
|||||||
&horizontal_dir,
|
&horizontal_dir,
|
||||||
character_shape,
|
character_shape,
|
||||||
min_width,
|
min_width,
|
||||||
false,
|
true,
|
||||||
filter,
|
filter,
|
||||||
)
|
)
|
||||||
.is_some()
|
.is_some()
|
||||||
@@ -607,7 +607,7 @@ impl KinematicCharacterController {
|
|||||||
&-self.up,
|
&-self.up,
|
||||||
character_shape,
|
character_shape,
|
||||||
max_height,
|
max_height,
|
||||||
false,
|
true,
|
||||||
filter,
|
filter,
|
||||||
) {
|
) {
|
||||||
let [_vertical_slope_translation, horizontal_slope_translation] =
|
let [_vertical_slope_translation, horizontal_slope_translation] =
|
||||||
@@ -634,7 +634,7 @@ impl KinematicCharacterController {
|
|||||||
&-self.up,
|
&-self.up,
|
||||||
character_shape,
|
character_shape,
|
||||||
max_height,
|
max_height,
|
||||||
false,
|
true,
|
||||||
filter,
|
filter,
|
||||||
)
|
)
|
||||||
.map(|hit| hit.1.toi)
|
.map(|hit| hit.1.toi)
|
||||||
|
|||||||
Reference in New Issue
Block a user