Reorder and update character controller checks in collision world
This commit is contained in:
@@ -465,17 +465,13 @@ export class RapierCollisionWorld {
|
||||
);
|
||||
const supportGrounded = supportProbe.grounded;
|
||||
|
||||
if (motion.y > COLLISION_EPSILON && snapToGroundWasEnabled) {
|
||||
this.characterController.disableSnapToGround();
|
||||
}
|
||||
|
||||
if (!supportGrounded && autostepWasEnabled) {
|
||||
this.characterController.disableAutostep();
|
||||
}
|
||||
|
||||
const computeResolvedMovement = (allowAutostep: boolean) => {
|
||||
this.playerCollider.setTranslation(currentCenter);
|
||||
|
||||
if (motion.y > COLLISION_EPSILON && snapToGroundWasEnabled) {
|
||||
this.characterController.disableSnapToGround();
|
||||
}
|
||||
|
||||
if (autostepWasEnabled) {
|
||||
if (allowAutostep) {
|
||||
this.characterController.enableAutostep(
|
||||
|
||||
Reference in New Issue
Block a user