-
Notifications
You must be signed in to change notification settings - Fork 563
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
Constructors. #14
Comments
It should be possible to use different overloaded constructors, assuming they are differentiated by the number of parameters. For btHingeConstraint, looking in the generated code (bullet/build/bindings.js or builds/ammo.new.js - they only exist if you build locally though), there is
which looks like it handles the 4 cases. Or at least tries to - I haven't tested it myself ;) Can you provide a testcase that shows the problem you are seeing? |
After working some more with this, I realized there is nothing wrong with the constructors. I can use the two first constructors without problem, see my double pendulum at: http://granular.cs.umu.se/ammo/Demos/PendulumDemo/ I cannot seem to be able to use the 3rd or 4th constructor though (which uses local frames). No matter how I use them, the constraint seem to be unsolveable and blow up. I have tried to port the Ragdolldemo from the original Bullet Physics trunk and also this simple demo: http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=9&t=3191, without success. I'm fine with using pivots and axes, but I find it annoying to not be able to use frames. I'll do some more testing and come back. Did anyone else try to use the frame-based hinge constraints? |
Hi @schteppe , did you found the issue with this? |
@RodrigoHamuy it was a loooong time ago... Don't really remember. If I solved it back then, you can probably find the solution here: https://github.com/schteppe/ammo.js-demos |
Thanks @schteppe ! The frame based constructor is there now. The issue for me was that it didn't work if you set the hinge limit to 0,0. Instead, I use 0.0001 now and it works. |
Hey @RodrigoHamuy can you give some more details about your fix? I've set my limits to 0.0001 but I'm still getting NaN values for my body transformations.. |
I was just wondering, is it possible to use other constructors of Bullet classes than the first?
For example, the btHingeConstraint. It's got four constructors:
(See http://www.bulletphysics.com/Bullet/BulletFull/classbtHingeConstraint.html for full doc.)
The first constructor seems to work (see the ragdoll demo), but nothing happens when I try any other constructor. Did I miss something obvious here?
The text was updated successfully, but these errors were encountered: