RevoluteJoint stretching
Posted: Sun Aug 07, 2011 1:56 am
I have two different, but probably related, problems. Basically, I'm trying to replicate the system used in the game "Hammerfight," where you have weapons spin around a central axis (your ship).
The first problem is that when I create a "chain" of sorts out of rectangles and revolutejoints, and then I spin this system around, the chain links start stretching out. I would like them to stay connected to each other, end to end. The problem becomes more pronounced the more links there are in the chain.
The second is that when I create a rod attached to the "ship," and then I collide the rod into a wall, not only does it go through the ship, but when I stop forcing the rod down it acts like a pogo stick, propelling the ship. When the rod hits the wall, the system of the ship and the rod should simply stop.
Hopefully you can help! Two love files are attached, demonstrating the two problems. To move the "ship," the circle, click and hold the left mouse button. To see the chain stretching problem, click and hold the LMB and move it around in a circle, around the ship. To see the rod problem, collide the end of the rod into a wall.
The first problem is that when I create a "chain" of sorts out of rectangles and revolutejoints, and then I spin this system around, the chain links start stretching out. I would like them to stay connected to each other, end to end. The problem becomes more pronounced the more links there are in the chain.
The second is that when I create a rod attached to the "ship," and then I collide the rod into a wall, not only does it go through the ship, but when I stop forcing the rod down it acts like a pogo stick, propelling the ship. When the rod hits the wall, the system of the ship and the rod should simply stop.
Hopefully you can help! Two love files are attached, demonstrating the two problems. To move the "ship," the circle, click and hold the left mouse button. To see the chain stretching problem, click and hold the LMB and move it around in a circle, around the ship. To see the rod problem, collide the end of the rod into a wall.