Skip to content

Commit

Permalink
docs: Add limitations of SolverStrategy.Arcade (#3174)
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelAsherRivello authored Aug 11, 2024
1 parent 0d6ea12 commit defc48a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion site/docs/10-physics/08-a-physics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@ section: Physics

import PhysicsExample from '!!raw-loader!./examples/physics.ts';

Excalibur comes built in with two physics simulations.
Excalibur comes built in with two physics simulations.

- "Arcade" style physics which is good for basic collision detection for non-rotated rectangular areas.
- Example: platformers, tile based games, top down, etc
- "Realistic" style physics which is good for rigid body games where realistic collisions are desired
- Example: block stacking, angry bird's style games, etc

**Limitations**

> **_Note:_** The `SolverStrategy.Arcade` does not support `body.friction`.
## Arcade

Arcade physics simulation is on by default, but can be enabled explicitly in the `Engine` constructor.
Expand Down
5 changes: 4 additions & 1 deletion src/engine/Collision/BodyComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,10 @@ export class BodyComponent extends Component implements Clonable<BodyComponent>
public bounciness: number = 0.2;

/**
* The coefficient of friction on this actor
* The coefficient of friction on this actor.
*
* The {@apilink SolverStrategy.Arcade} does not support this property.
*
*/
public friction: number = 0.99;

Expand Down

0 comments on commit defc48a

Please sign in to comment.