Page 1 of 1

define local coordinates for btGeneric6DofSpring2Constraint

Posted: Wed Jan 18, 2017 1:15 pm
by Ehsanizadi
Hi,

I want to define a spring between two rigid bodies (one static and one dynamic). However, I want the axis of the spring to be rotated along the line connecting both rigid bodies. In this way, the spring stiffness will remain valid regardless of the rotation of the dynamic rigid body.

Does anyone know how can I define a local axis for btGeneric6DofSpring2Constraint?
Or should I update the orientation of the axis in any frame and pass it to btGeneric6DofSpring2Constraint? (if yes, how?)

Thanks

Re: define local coordinates for btGeneric6DofSpring2Constra

Posted: Wed Jan 18, 2017 2:23 pm
by benelot
Hi,

I do not think that you can define a local axis, I think you will have to update it through all reference frames. Regarding that question, does my ReferenceFrameHelper help you in any way?
https://github.com/bulletphysics/bullet ... Helper.hpp

It can convert global ref frame to local ref frames and back.