I’m trying out a pendulum using a DistanceConstraint.
I thought it would be a good idea to connect a string (cylinder in this case) to the ball, so I tried that, but it was displayed vertically, and I couldn’t get it to look like it was hanging from a string.
What should I do to realize the string?
Do you need to understand 6DoF?
would like to realize Pendulum wave with Havok.
The cylinder isn’t a physical body itself, so we need to find its rotation ourselves. Thankfully, it’s pretty easy, you just need to compute the rotation that gets from its default up vector (0,1,0) to the vector formed between the ball and the box: Experiment swinging the pendulum | Babylon.js Playground (babylonjs.com)
Pretty cool looking PG btw! Can we add it to the docs?
Thank you for teaching me how to calculate it.
Of course, feel free to add samples to the documentation.
Thank you for adding it to the documentation sample.
BTW, I have a simple question about pendulums.
It seems that the pendulum’s swing gradually slows down, but where are its parameters specified? I tried changing friction and restitution, but it didn’t seem to have anything to do with damping.
There’s a separate parameter for damping, there is
Thank you for teaching me that method.
However, it seemed that even if I set it to zero, I could not completely eliminate the attenuation. Am I using something wrong?
Oh, you’re not! There is a bug with the damping currently, I had forgotten about it but @eoin reminded me It will be fixed in the next plugin update! Spinning physics object stops abruptly (havok) - #3 by eoin