SilentAssassin21 wrote:I ran this code on 2 boxes connected together and pivots are at the boxes centers, the boxes they collide in the way that they come in the same place and there is no collision reaction
This is correct. By default newton disables collision betwwen bodies, whan you creat a joint between them.
Also, since pivots are at both boxes centers, result is that they connect with zero distance.
If you want some distance to build a rope, you need at least one point at a offset from center, like i did in my example:
vec pa = ma[3] + ma[0] * 10; // center + xaxis *10
With newton mathlib that would look like:
dVector vec1(1,0,0,0.f);
dVector vec2(0,1,0,0.f);
dVector vec3(0,0,1,0.f);
dVector offset = &childBox->matrix.m_posit + childBox->matrix.m_front.scale(10); // not 100% sure about syntax
NewtonUserJointAddLinearRow(m_joint,&offset [0],&parentBox->matrix.m_posit[0],&vec1[0]);
NewtonUserJointAddLinearRow(m_joint,&offset [0],&parentBox->matrix.m_posit[0],&vec2[0]);
NewtonUserJointAddLinearRow(m_joint,&offset [0],&parentBox->matrix.m_posit[0],&vec3[0]);