[ODE] how to stopbody enabling by joint

Mark Williams mark at image-engine.com
Tue Oct 30 12:30:29 MST 2007

Krystian Ligenza wrote:
> Mark Williams pisze:
>> Mark Williams wrote:
>>> Krystian Ligenza wrote:
>>>> Mark Williams pisze:
>>>>>> Krystian Ligenza wrote:
>>>>>>> I have look more in mailing list archive, and see that this 
>>>>>>> topic was many times discussed. Main problem is how to set that 
>>>>>>> joint should only affect  one body and other  left  unforced.  
>>>>>>> Maybe we should think about adding flag for this, by adding 
>>>>>>> dJointSetXXXParam with dParamAffectBoth, dParamAffectFirst, 
>>>>>>> dParamAffectSecond? If joint can link with world, this should 
>>>>>>> not be impossible to do - correct me if I'm wrong?          
>>>>>> Why wouldn't you just create the joint attached to the affected 
>>>>>> body and the world (NULL), then? I do that for collisions in 
>>>>>> certain cases, for example.
>>>>> If you attach a joint to a null-body, then the joint considers 
>>>>> that body to have zero velocity. This is a potential source of 
>>>>> error when colliding against non-simulated yet animated geoms. I 
>>>>> think Krystian's patch has a great deal of value.
>>>> Hope that you are talking about "void dJointSetFixedBodies 
>>>> (dJointID j,const dVector3 p1,const
>>>> dQuaternion q1,const dVector3 p2,const dQuaternion q2)" function 
>>>> that I proposed for adding, becouse I haven't add what I was 
>>>> talking about in this mail (about dJointSetXXXParam ). I have 
>>>> thought, that only thing that is need to be change for all joints 
>>>> is XXXGetInfo2(...), but It seems that all step functions also 
>>>> check if joint is attached to Body and World, so this become too 
>>>> time consume for me to make it good. Also joint can be attached to 
>>>> World - Body, or Body - World, but internally it is always 
>>>> Body-World, so making a param that hide one of Bodies as World 
>>>> would be a tricky part.        

I may be wrong but it seems that by adjusting the variables b1 and b2 on 
lines 709 and 710 in quickstep.cpp might be enough to get things going?


More information about the ODE mailing list