Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose wakeUp() in body api #137

Closed
andreivips opened this issue Dec 7, 2020 · 2 comments · Fixed by #230
Closed

Expose wakeUp() in body api #137

andreivips opened this issue Dec 7, 2020 · 2 comments · Fixed by #230
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@andreivips
Copy link

andreivips commented Dec 7, 2020

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

Also, cannons world.hasActiveBodies is used to invalidateFrameloop in react-three-fiber:

if (e.data.active) invalidate()

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.

@johnmarinelli
Copy link

i also ran into this issue, would be nice to have this feature

@stockhuman stockhuman added the enhancement New feature or request label Jan 15, 2021
@andreivips
Copy link
Author

andreivips commented Jan 17, 2021

Should be closed by pmndrs/cannon-es#61

@andreivips andreivips reopened this Jan 19, 2021
@stockhuman stockhuman added the good first issue Good for newcomers label Feb 24, 2021
@stockhuman stockhuman linked a pull request Jun 28, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants