We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f5f7185 commit ecfaf8bCopy full SHA for ecfaf8b
src/BasicSystem.tsx
@@ -105,7 +105,8 @@ const BasicObject = ({ entityUUID }: { entityUUID: EntityUUID }) => {
105
const angle = Math.random() * Math.PI * 2
106
const direction = new Vector3(Math.sin(angle), 0, Math.cos(angle))
107
const velocity = 0.025 + Math.random() * 0.01
108
- Physics.applyImpulse(entity, direction.multiplyScalar(velocity))
+ const world = Physics.getWorld(entity)!
109
+ Physics.applyImpulse(world, entity, direction.multiplyScalar(velocity))
110
}, [entity])
111
112
return null
0 commit comments