bullet3
bullet3 copied to clipboard
Quaternion Based 6DOF Spring Joint Constraint
Hello, I saw that there was a "demand" for Quaternion Based 6DOF Spring Joint Constraint calculation:
https://github.com/bulletphysics/bullet3/issues/4162 https://pybullet.org/Bullet/phpBB3/viewtopic.php?t=8153
So I made a new class:
btGeneric6DofSpringConstraintQuaternion
Based on btGeneric6DofSpring2Constraint. This class was made to provide more control over spring joint "equilibrium" rotation using quaternions instead of Euler Axes. This makes it useful for "puppeteering" joint controlled active ragdolls.
I also took the liberty of adding in a new example scene in the explorer.
(Quaternion Based Joints (left, center); Euler Axis Based Joint (right))
Per the image, the set equilibrium angles are as follows: X:0° Y:90° Z:45°
More rotation settings are available in the DOF6SpringQuatSetup.cpp file. Change the following macro definitions as you see fit: USE_6DOF(Q, ,2) ROTATION_([1-6])
If there's anything I missed, I'd be happy to comply.
hmm, for some reason it found function "Dof6SpringQuatCreateFunc" unresolved...
Nope, still didn't work... what gives?
Nope, still didn't work... what gives?
Its an exact copy of Dof6Spring2Setup.cpp (.h) I just renamed the function
Thanks for the PR. From Appveyor failed build, it looks like the build is broken. Some cmake or premake build files need updating, adding the new c++ file?
Thanks for the PR. From Appveyor failed build, it looks like the build is broken. Some cmake or premake build files need updating, adding the new c++ file?
Hello. Sorry for the late reply. I hope I'm not too late to get this PR accepted. I'm not sure what part of the cmake file to update or what c++ file I should add to resolve this. What should I do?
Thanks for the PR. From Appveyor failed build, it looks like the build is broken. Some cmake or premake build files need updating, adding the new c++ file?
Hello. Sorry for the late reply. I hope I'm not too late to get this PR accepted. I'm not sure what part of the cmake file to update or what c++ file I should add to resolve this. What should I do?
I might be wrong but I think I figured it out. I think I have to update this cmake file under this directory:
I have to add in my DOF6SpringQuatSetup
somewhere here:
![Screen Shot 2023-01-29 at 10 38 19 PM](https://user-images.githubusercontent.com/37253663/215333935-7ea80de7-c0c6-42cd-8b0b-bf140eab249c.png)
brb...
noice, it worked!
@erwincoumans, please review :)