There was an error while loading. Please reload this page.
1 parent 9c8c6df commit 29fa3e4Copy full SHA for 29fa3e4
1 file changed
packages/rapier/src/composables/useRapier.ts
@@ -19,7 +19,9 @@ const [
19
const RAPIER = await import('@dimforge/rapier3d-compat')
20
await RAPIER.init()
21
rapier.value = RAPIER
22
- world.value = new RAPIER.World(GRAVITY)
+ // Copy: World stores the vector by reference and Physics mutates it in place,
23
+ // so passing the shared constant would leak gravity across every world.
24
+ world.value = new RAPIER.World({ ...GRAVITY })
25
}
26
27
const setWorld = (w: World) => {
0 commit comments