I followed a grappling tutorial where the cable shoots out to where you click. That part works fine, but the end (I guess origin) or the cable is still in the center of my character. It lets me put a static offset for the end location, but how can I have it attached to an object or socket on the hand of my character?
I’ve edited in a link to the tutorial in case you know it. Otherwise, here’s everything I’ve got in blueprint for the grapple…
This is what I’ve got in the Event Graph (other than the default 3rd person character nodes). Let me know if it’s not high res enough, I can make more zoomed in screenshots.
The best way to achieve this is to add a socket to the hand of the pawn and in then attach teh grappleLine to the pawn. That is, make the mesh the parent.
Then, open the mesh in the editor and add a socket to the hand. Once that is done, save the mesh and go back to the character blueprint, select the grappleLine and select the socket you made for the hand as “parent socket”.
So I’m not sure if I did it right, because I couldn’t figure out what you meant when you said make two sockets. I ended up with the cable still being in the center of the body, with it just extending to the wrist.:
The reason for why that happens is because the tutorial is setting the endLocation variable to the center of the body. If you want to let it automatically update to wherever the gun is, simply do as I said and set the endLocation to the location you want to attach to. However, the quickest fix for your setup seems to be just to set the endLocation variable to the location of your hand.
I just tested it on a testproject of mine and it followed the moving object perfectly with no problems at all.