Add deps to hooks: useBox, usePlane e.t.c.
MaxmaxmaximusAWS opened this issue · comments
now i have this:
const [ref, api] = useBox(() => ({
mass: 1,
args: [4, 4, 4],
isKinematic: true,
}))
but want to this:
const [size, setSize] = useState([4, 4, 4])
const [ref, api] = useBox(() => ({
mass: 1,
args: size,
isKinematic: true,
}), [size])