CharacterMover

expect object CharacterMover

Character movement solver utilities.

Use with io.github.joaomcl.boks2d.core.World.collideMover to implement kinematic character movement.

Functions

Link copied to clipboard
expect fun clipVector(vector: Vec2, planes: List<CollisionPlane>): Vec2

Clip a velocity vector against collision planes. Planes with zero push or clipVelocity set to false are skipped.

Link copied to clipboard
expect fun solvePlanes(targetDelta: Vec2, planes: List<CollisionPlane>): PlaneSolverResult

Solve the position of a mover that satisfies the given collision planes.