Character movement solver. More...
Data Structures | |
| struct | b3PlaneResult |
| The plane between a character mover and a shape. More... | |
| struct | b3CollisionPlane |
| These are collision planes that can be fed to b3SolvePlanes. More... | |
| struct | b3PlaneSolverResult |
| Result returned by b3SolvePlanes. More... | |
| struct | b3BodyPlaneResult |
| Body plane result for movers. More... | |
Typedefs | |
| typedef bool | b3PlaneResultFcn(b3ShapeId shapeId, const b3PlaneResult *plane, int planeCount, void *context) |
| Used to collect collision planes for character movers. | |
| typedef bool | b3MoverFilterFcn(b3ShapeId shapeId, void *context) |
| Used to filter shapes for shape casting character movers. | |
Functions | |
| b3PlaneSolverResult | b3SolvePlanes (b3Vec3 targetDelta, b3CollisionPlane *planes, int count) |
| Solves the position of a mover that satisfies the given collision planes. | |
| b3Vec3 | b3ClipVector (b3Vec3 vector, const b3CollisionPlane *planes, int count) |
| Clips the velocity against the given collision planes. | |
Character movement solver.
| struct b3PlaneResult |
| struct b3CollisionPlane |
These are collision planes that can be fed to b3SolvePlanes.
Normally this is assembled by the user from plane results in b3PlaneResult.

| Data Fields | ||
|---|---|---|
| bool | clipVelocity | Indicates if b3ClipVector should clip against this plane. Should be false for soft collision. |
| b3Plane | plane | The collision plane between the mover and some shape. |
| float | push | The push on the mover determined by b3SolvePlanes. 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 b3PlaneSolverResult |
| struct b3BodyPlaneResult |
Body plane result for movers.

| Data Fields | ||
|---|---|---|
| b3PlaneResult | result | The plane result. |
| b3ShapeId | shapeId | The shape id on the body. |
| typedef bool b3MoverFilterFcn(b3ShapeId shapeId, void *context) |
Used to filter shapes for shape casting character movers.
Return true to accept the collision
| typedef bool b3PlaneResultFcn(b3ShapeId shapeId, const b3PlaneResult *plane, int planeCount, void *context) |
Used to collect collision planes for character movers.
Return true to continue gathering planes.
| b3Vec3 b3ClipVector | ( | b3Vec3 | vector, |
| const b3CollisionPlane * | planes, | ||
| int | count ) |
Clips the velocity against the given collision planes.
Planes with zero push or clipVelocity set to false are skipped.
| b3PlaneSolverResult b3SolvePlanes | ( | b3Vec3 | targetDelta, |
| b3CollisionPlane * | planes, | ||
| int | count ) |
Solves the position of a mover that satisfies the given collision planes.
| targetDelta | the desired translation from the position used to generate the collision planes |
| planes | the collision planes |
| count | the number of collision planes |