pub fn project_velocity(v: Vector, normals: &[Dir]) -> VectorExpand description
Projects input velocity v onto the planes defined by the given normals.
This ensures that velocity does not point into any of the planes, but along them.
This is often used after MoveAndSlide::cast_move to ensure a character moved that way
does not try to continue moving into colliding geometry.
This function uses a GJK-like algorithm to solve the dual problem to velocity projection, from which obtaining the solution of the primal problem is simple. See https://benspiers.co.uk/Games/Velocity-Projection for the full mathematical details.