define local coordinates for btGeneric6DofSpring2Constraint

Post Reply
Ehsanizadi
Posts: 72
Joined: Mon Dec 02, 2013 4:13 pm

define local coordinates for btGeneric6DofSpring2Constraint

Post 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
benelot
Posts: 350
Joined: Sat Jul 04, 2015 10:33 am
Location: Bern, Switzerland
Contact:

Re: define local coordinates for btGeneric6DofSpring2Constra

Post 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.
Post Reply