Grapple hook test
A downloadable game for Windows and macOS
Just a test of a grappling hook with 4 different sliders. One effects how stretchy it is, one effects how hard you are initially pulled by the rope, one changes how much energy is conserved from the rope bouncing, and the final one is how many dots are used to simulate the physics of the rope.
The way it works:
I first just made the pull physics which when the player clicks at a point, an invisible spring is placed between the player and the first point seen by a raycast shot in the direction the player clicked. The Spring only acts on the player when the spring is in tension, not when it's in compression which gives you an invisible bungee cord.
To simulate the actual visual part of the rope I created a bunch of invisible points between the player and the anchor and had them apply a spring force to the joint in front and the joint behind causing them to hopefully act similar to the invisible force applied to the player. Then I drew a line between all of the adjacent joints and that's how you get a rope.
Download
Click download now to get access to the following files:
Leave a comment
Log in with itch.io to leave a comment.