I have 2 problems, One is that when I use the grappling hook, it has a default velocity and acceleration, I would like it to not have an acceleration, and just pull the player at a consistent velocity until he reaches the pull location.
My main problem is that he sometimes stops in mid air, as his acceleration runs out before he reaches the pull location, and he just hangs there, until I grapple again.
You should make line trace for hook, then make capsule trace for character, and then interpolate character location to hook location (or nearest location) with lerp vector function.
I just looked it up, and it does seem much simpler than what I have, But you seem to need a Timeline to set the alpha for the lerp, is there a simpler way to increment the alpha?
So you simply increase alpha by delta seconds and use it in lerp.
DeltaSeconds * 10 - to increase movement speed.
As you can see, in my example I also have “Movement Enabled” variable. I use it to disable movement during interpolation and enable it after, to prevent player input work during it. You could use something similar.
I used the exact same setup, “MoveToHook” function called in tick based on the condition.
Only instead of using Delta seconds, I tried using “Get Controller input → Get Input Key Time Down” and plugged that into alpha (Then had to multiply by 0.17 by trial and error to get a speed I liked.)
And then I already had a “set actor location” to the hook location directly when you’re within a certain range to prevent hang and Jitteri-ness.
It also preserves a bit of momentum when you hook while falling, Gives a slight swing motion that I kinda like.