Skip to main content

try_step_up

Function try_step_up 

Source
fn try_step_up(
    state: &EntityPhysicsState,
    movement: DVec3,
    aabb: &WorldAabb,
    ground_result: &MoveResult,
    entity_collisions: &[WorldAabb],
    world: &dyn CollisionWorld,
) -> MoveResult
Expand description

Attempts to step up over an obstacle.

This implements vanilla’s step-up algorithm from Entity.collide().

Vanilla calls collideWithShapes(Vec3(movement.x, stepHeight, movement.z), groundedAABB, colliders) which uses the dynamic axis order. If step-up gives more horizontal progress, use it.

Matches: Entity.collide() lines 1077-1095