Skip to content
This repository has been archived by the owner on Feb 10, 2023. It is now read-only.

[BUG] preStep and postStep events missing from NgtPhysics #73

Closed
IRobot1 opened this issue Mar 20, 2022 · 4 comments
Closed

[BUG] preStep and postStep events missing from NgtPhysics #73

IRobot1 opened this issue Mar 20, 2022 · 4 comments
Labels
block enhancement New feature or request

Comments

@IRobot1
Copy link
Contributor

IRobot1 commented Mar 20, 2022

I'm trying to migrate Cannon Callbacks example using @angular-three/cannon.

I don't see these callbacks on the NgtPhysicsXXX object api method or the NgtPhysics object.

I don't see a way to get at the physics store or state to access the world state.

Any help or guidance is appreciated.

@nartc
Copy link
Owner

nartc commented May 2, 2022

Do we still need this? @IRobot1

@IRobot1
Copy link
Contributor Author

IRobot1 commented May 2, 2022

Yes. I think its needed

@nartc
Copy link
Owner

nartc commented May 2, 2022

pmndrs/use-cannon#67 Until cannon-worker adds support for preStep and postStep, we cannot really do anything sadly

@nartc nartc added enhancement New feature or request block labels May 2, 2022
@IRobot1
Copy link
Contributor Author

IRobot1 commented May 3, 2022

Actually, its not needed. Simply subscribe to velocity (or other api property) which is called on every stepSize change. You don't get to choose pre or post step, but it works quite well for calculating orbits

See callbacks example and code

image

@IRobot1 IRobot1 closed this as completed May 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants