First of all
Hi everbody (first post here)
My problem:
I created btGeneric6DofConstraint for 2 rigidBodies: For every rigidBody i created relative frame transform (in object space of rigidBody) and set some linear/angular limitations
What I want to achieve:
After constraint was created I want to modify transform of rigid body A in constraint but rigid body B must stay where it was before.
So I calculated new relative frame transform for new pivot and set it using constraint->getFrameOffsetA().setOtigin(pivot)
(same code is used in Demos for manipulating rigidBodies using mouse). This works for rigid body A great (behave exactly how I want it to)
But this also affect rigid body B in constraint.
So I must also recalculate relative frame transform of rigid body B for new pivot. I did that (new pivot for rigid body A was recalculated into relative frame of rigid body B), but now they both stay at same position (looks like they nullified each other).
Solution;
Easy solution is to create new constraint and delete old, but I want to do it more frequently.
I thin my calculations are correct because I am using same calculation code when creating new constraint
Maybe I misunderstood the idea of getFrameOffset function (is it moving rigid body with whole constraint??) or I need to rebuild something in constraint
If someone can explain me what am I doing wrong or how to do it correctly I will be very glad
Thanks for replies