-
Notifications
You must be signed in to change notification settings - Fork 158
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
setting pivots in useConstrained on setup isn't enough #51
Comments
It looks like in Schteppe's demo, he's just creating a new constraint on each click. I can't think of any reason why we couldn't allow updating a constraint's pivots (which doesn't mean there isn't a reason, haha), just need to make that possible in |
i believe its really just a loose vector on the object, so it could be overwritten, correct? in that case we could maybe extend makeApi with new updaters. |
I just checked and it looks like you're right, should be fine to just overwrite those vectors, and they should get updated automatically (rotated into World space) on the World step |
I took a quick stab at it, but I'm not sure if the pivot vectors are in the correct coordinate space. Can you test this branch against the MondayMorning demo when you have a moment? It's worth noting that some constraints don't have pivots, and some constraints do have axes - so I think we should make the types more honest at some point... Is there a reason to add the axes to the Constraint API (I'm guessing yes)? |
Is there any progress on this issue? I'm trying to make a demo much like the mousepick one that Paul shared, and I'm stuck because reactive pivots in |
im trying to do this: http://schteppe.github.io/cannon.js/examples/threejs_mousepick.html
in the example repo, the monday morning demo, try picking the chair - it just makes no sense because it goes to object center (i guess). the pivot needs to be calculated once the object is clicked. but currently the constraint is first set up with a fixed pivot, then disabled and enabled on demand.
any ideas how this could be solved?
The text was updated successfully, but these errors were encountered: