Grappling hook not working properly
I have been trying grappling hook tutorials left and right, Nothing is working properly, I ended up with several functions, all of which end up with erratic and horrible behavior.
I started out with this, from an Attack on Titan grappling system tutorial on Youtube, The original result had the Delta time and the Get Velocity plugged in as I've crossed out, It gave me a terrible result, and the player would Zoom around uncontrollably as long as I had the button pressed.
After tweaking and breaking the crossed out links, replacing delta time with 0.25 and removing the "Get velocity" from the equation, It gave me a better result but still horrible.
And then it would maintain my momentum after I had (Finally) successfully grappled to my desired location, so that it threw me away with my previous momentum.
I tried several more until I ended up with this:
Again, with tweaking I ended up with a decent result, but the player would lose momentum the closer he gets to the hook, and when he had latched on (50 units below the hook), and when I release the button, He would still get thrown away, only this time in the opposite direction, as in he gets thrown back from where he came.
Please help, this is very frustrating, and I am unable to continue work on the game until I have this right.
Help is greatly appreciated.
asked Aug 10 '17 at 12:14 PM in Blueprint Scripting
I found a solution that works pretty well, after fiddling with the numbers for a while.
(Hook location - Player location) X (Get world delta seconds X 200) = Launch Velocity.
Enabled XY, and Z Overrides, and it works well.
Let me know if this has helped anyone, or if anyone has any questions.
answered Aug 10 '17 at 06:59 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here