Closed andreivips closed 3 years ago
Hi, and thanks for great libs !
Bodies falls asleep ( when <Physics allowSleep={true}> ), but after, won't move with applyImpulse/Force, wakeUp() needs to exposed: https://github.com/pmndrs/cannon-es/blob/eb222d1169195dd0b570d1aaa749a814bacd747a/src/objects/Body.ts#L261
<Physics allowSleep={true}>
Also, cannons world.hasActiveBodies is used to invalidateFrameloop in react-three-fiber: https://github.com/pmndrs/use-cannon/blob/0243fb366f7a1a5343cfb9930fe274f5fee9a6d7/src/Provider.tsx#L151 and can be exposed in useCannon's Provider (<Physics...>) to track bodies state.
world.hasActiveBodies
<Physics...>
Maybe with an iteration few more methods/props would be straight available.
i also ran into this issue, would be nice to have this feature
Should be closed by https://github.com/pmndrs/cannon-es/pull/61
Hi, and thanks for great libs !
Bodies falls asleep ( when
<Physics allowSleep={true}>
), but after, won't move with applyImpulse/Force, wakeUp() needs to exposed: https://github.com/pmndrs/cannon-es/blob/eb222d1169195dd0b570d1aaa749a814bacd747a/src/objects/Body.ts#L261Also, cannons
world.hasActiveBodies
is used to invalidateFrameloop in react-three-fiber: https://github.com/pmndrs/use-cannon/blob/0243fb366f7a1a5343cfb9930fe274f5fee9a6d7/src/Provider.tsx#L151 and can be exposed in useCannon's Provider (<Physics...>
) to track bodies state.Maybe with an iteration few more methods/props would be straight available.