From: Ethan Glasser-C. <gl...@cs...> - 2011-01-05 17:29:45
|
On 12/25/2010 02:27 AM, Moster Manokhatipaisarn wrote: > My code as follow: > > join = ode.FixedJoint(self.visualWorld.odeworld) > join.attach(self.vObjList[0].body, obj.body) > > However, I want to translate the fixedjoint position. > I try to translate but the result is not make sense. > > It would be better if I can detach this joint, translate it and attach > again. > But I don't know how to detach this joint I'm not sure I understand your question. You want to have two objects fixed together, but periodically change their positions? ODE does not provide a function to detach joints. Since FixedJoints don't have any state, you could probably destroy the joint, move the bodies, and create another one. However, be aware that the manual says: "Using this joint is almost never a good idea in practice, except when debugging. If you need two bodies to be glued together it is better to represent that as a single body." Hope this helps. Ethan |