Creating an anchor or tether *SOLVED*

jonmiller

14-07-2009 16:47:22

I'm trying to create an anchor for a ship which I thought would be fairly simple, but I can't seem to get it to work properly. What I want is to be able to "drop anchor" off the side of my ship and specify a max distance so that once I am that far from the anchor then I can't move any further. My ship just sets a linear velocity to make it move and I have been able to create a distance joint that is connected to the ship. When i turn on the debug renderer i can see that they are connected but no matter what I set the min/max distance to or setting the amount of spring to, the ship just keeps on going stretching the line like an infinite rubber band. If I do not freeze the anchor then it trails behind the ship properly, but I kinda want the reverse effect. I want the anchor to stay put while I crank the ship until it reaches it's limit and is forced to stop. Any ideas on what I might be doing wrong or if I should be using a different joint?

Thanks

*EDIT*
So I was able to do this with a D6Joint. I Ended up having to make the actor the joint was anchored to kinematic and also set the joint to be limited in the x, y, z direction. I had to also set the rotation to free and everything else was locked.