Feb 22, 2011 at 10:14 PM
Edited Feb 22, 2011 at 10:21 PM
In my project I have an object that sticks to another object when they collide and there after they should stay together and maintain the same angle.
the main body rotates based upon the mouse position. and the secondary body gets its angle and position through a joint between the two.
My first attempt was using a weld joint which does an excellant job at keeping them in the correct locations however when the main body is rotated by the mouse, the secondary body is slow to respond
this manifests its self in the form of a "flex" in the weld joint.
so to counter this i attempted to add an angle joint as well, which appeared to have no effect. so I commented out the code for creating the weld to make sure the angle was working and I found that as
the primary body rotates the secondary does also rotate but is sluggish in its responses.
My question is: is there a way to make the angle joint respond immediatly, and/or prevent the weld joint from flexing when rotation is applied to on of the bodies?
In asking this question the thought comes that it may be due to the mass or density of the objects. this is currently set to 0.01f I don't know if that's too high or what would normally be an optimal density.
In advance I would like to thank you all for the help. you have all been quite patient with me in my learning this great physics engine.
EDIT: I also thought I should mention that I am applying the rotation by getting an angle of the mouse relative to the fixture position and then setting fixture.body.rotation equal to that angle.