Closed kjarosz closed 8 years ago
The rope is back to being a pole but it'd be nice if it didn't actually "push" the player away. When the player hooks below him, the rope will actually push the player away to travel a circular path. Instead of having just a max distance, it keeps a player at a particular distance all the time.
Switching to a distance joint did the trick. There is an option that allows just max distance and it'll only apply force to the player if he gets too far from the pivot point.
The issue is that the player will come to a very rough stop when that happens. Maybe there is a way to do the same thing with the spring joint.
We could attach a spring joint to the end of the distance joint and maybe lock its rotation angle relative to the distance joint
My worry with that is that we'll have the same bug as we did with the other ropes. I think the bug was most likely due to the fact that unity didn't account for all the mass that adds up by the time you reach the end of the rope and it underestimates how much force it should apply to pull the player up. If we link the distance joint to the a spring joint, the I'm worried we'll have the same issue because the joint will have to be attached to a light object, otherwise it'll kill the player's momentum.
I am playing around in the build and nothing feels odd to me about the joint. the movement is smooth and intuitive and i haven't noticed any abrupt loss of momentum on the joint.
It looks like we're going to be keeping the single distance joint. As nice as we can make it with the spring joint, it's glitchy and doesn't feel as good so we're keeping this one. That'll seem to be the final iteration.
We'll still just need to make the player not get stuck on the environment when swinging and it'll be done.
I fixed this issue by changing the physics material of the frog while in the air to a frictionless material.
Too much time is being spent on this mechanic and there's not guarantee it'll be functional at the end the way it's going so it's time to settle on something and finalize the mechanic.