Limit velocity if climbable

This commit is contained in:
GitGhillie
2025-04-17 16:42:40 +02:00
parent 248f92be27
commit cdbd2f3d39

View File

@@ -120,12 +120,9 @@ pub fn kinematic_controller_collisions(
// │ * | // │ * |
// *───────────────────* // *───────────────────*
let _max_y_speed = -linear_velocity_xz * slope_angle.tan(); let max_y_speed = -linear_velocity_xz * slope_angle.tan();
// Commenting out this line can help with the crate jumping issue
// TODO: figure out why this is needed, without it we linear_velocity.y = linear_velocity.y.max(max_y_speed);
// cannot do these crate to crate jumps anymore which is intented.
// linear_velocity.y = linear_velocity.y.max(max_y_speed);
} else { } else {
// The character is intersecting an unclimbable object, like a wall. // The character is intersecting an unclimbable object, like a wall.
// We want the character to slide along the surface, similarly to // We want the character to slide along the surface, similarly to