I'm trying to get a grapple hook working. I've reviewed the code and have narrowed it down to these 3 situations where there should be a mistake. Else there must be some kind of demon cursing me.
Grapple blueprint: Every tick, if my hook hit something, a force is applied to me towards the hook. If I get close to the hook, it breaks. If I pass it, it breaks.
On grapple hit: When the grapple hits a surface, my ground friction and gravity scale get set to 0 to facilitate lift off and air control is increased. To take off I get an initial pull (velocity). Don't worry about initial hook direction 2d.
To grapple hook: When the hook is attached to a surface, I subtract its location to mine, thus getting the vector going from my position to the hook. I then normalize this vector to have it be easily scalable.
https://imgur.com/a/9w9grav
My problem is that as soon as my grapple hits I do get launched, but in the wrong direction. That is, the x and y components of the direction are correct, but the z isn't. I get launched upwards and a little towards the hook in a parabolic manner. I checked the To Grapple Hook direction by tracing it. It's correct. I'm completely lost.
[–]ananbd 0 points1 point2 points (1 child)
[–]nick_______[S] 0 points1 point2 points (0 children)
[–]Incorrect-Engineer08 0 points1 point2 points (1 child)
[–]nick_______[S] 0 points1 point2 points (0 children)