define local coordinates for btGeneric6DofSpring2Constraint

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

define local coordinates for btGeneric6DofSpring2Constraint

Post by Ehsanizadi » Wed Jan 18, 2017 1:15 pm


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?)


Posts: 350
Joined: Sat Jul 04, 2015 10:33 am
Location: Bern, Switzerland

Re: define local coordinates for btGeneric6DofSpring2Constra

Post by benelot » Wed Jan 18, 2017 2:23 pm


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? ... Helper.hpp

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

Post Reply