I have my player GameObject, towing a chain of other objects using SpringJoints, all works well & good. They are flying in a pseudo-2D world, which is a finite size. When the player goes past a certain limit near the edges, I translate everything across to the other side, so it's like having a globe world - again, this works fine for the player. Trouble is, the towed objects don't seem to translate properly, and spend a few frames whizzing about as their spring joints readjust, so it looks a bit odd. The basic code is -
Player (on FixedUpdate() ):
It's as if the spring joint is affecting the translation somehow. If anyone knows what's going on, I'd appreciate some advice!
asked Feb 01 '12 at 11:59 AM
Well, I fixed it, but to be honest, I don't know why the first method didn't work. The fix is -
If anyone can follow this up, I'd be very happy!
answered Feb 02 '12 at 03:59 PM