Skip to content

1.2.1 to 1.3.0 Migration guide

Hugo Wiledal edited this page Feb 12, 2024 · 1 revision

Update to @dimforge/rapier3d-compat 0.12.0

Some <Physics /> props have been changed to match the new world initiation properties in Rapier 0.12.0.

Changed props:

- maxStabilizationIterations?: number
- maxVelocityFrictionIterations?: number
- maxVelocityIterations?: number
+ allowedLinearError?: number
+ numSolverIterations?: number
+ numAdditionalFrictionIterations?: number
+ numInternalPgsIterations?: number
+ minIslandSize?: number
+ maxCcdSubsteps?: number

There aren't direct alternatives for all old parameters. See the Physics component docs for more information on the new parameters. https://pmndrs.github.io/react-three-rapier/interfaces/PhysicsProps.html

New behavior of contact force events

During regression testing of the new update some new behavior of contact force events was observed.

Events do not fire as they used to, and the magnitude in events differ from identical scenes using @dimforge/[email protected].

If you use contact force events, you can set numSolverIterations to 1, as a workaround (thanks @0xtito).

<Physics numSolverIterations={1}>...</Physics>