Character movement solver. More...
Data Structures | |
| struct | b2PlaneResult |
| These are the collision planes returned from b2World_CollideMover. More... | |
| struct | b2CollisionPlane |
| These are collision planes that can be fed to b2SolvePlanes. More... | |
| struct | b2PlaneSolverResult |
| Result returned by b2SolvePlanes. More... | |
Functions | |
| b2PlaneSolverResult | b2SolvePlanes (b2Vec2 position, b2CollisionPlane *planes, int count) |
| Solves the position of a mover that satisfies the given collision planes. | |
| b2Vec2 | b2ClipVector (b2Vec2 vector, const b2CollisionPlane *planes, int count) |
| Clips the velocity against the given collision planes. | |
Character movement solver.
| struct b2PlaneResult |
| struct b2CollisionPlane |
These are collision planes that can be fed to b2SolvePlanes.
Normally this is assembled by the user from plane results in b2PlaneResult

| Data Fields | ||
|---|---|---|
| bool | clipVelocity | Indicates if b2ClipVector should clip against this plane. Should be false for soft collision. |
| b2Plane | plane | The collision plane between the mover and some shape. |
| float | push | The push on the mover determined by b2SolvePlanes. Usually in meters. |
| float | pushLimit |
Setting this to FLT_MAX makes the plane as rigid as possible. Lower values can make the plane collision soft. Usually in meters. |
| struct b2PlaneSolverResult |
| b2Vec2 b2ClipVector | ( | b2Vec2 | vector, |
| const b2CollisionPlane * | planes, | ||
| int | count ) |
Clips the velocity against the given collision planes.
Planes with zero push or clipVelocity set to false are skipped.
| b2PlaneSolverResult b2SolvePlanes | ( | b2Vec2 | position, |
| b2CollisionPlane * | planes, | ||
| int | count ) |
Solves the position of a mover that satisfies the given collision planes.
| position | this must be the position used to generate the collision planes |
| planes | the collision planes |
| count | the number of collision planes |