Download

grappling hook help needed

I’m currently working on a grappling hook system that allows the player to either launch themselves at an object, or alternatively orbit the point they hit using a physics constraint, if anyone knows how to get something like this working the assistance would be appreciated.

Hi ,

You could start with this ressource as a guide or to get some ideas :

I hope this can help you at least a little bit :wink:

This rig I made uses physics constraints. You’ll just need to spawn physics constraints with similar setting and with the appropriate objects attached.

thank both of you so much, ill probably post again soon

iv’e been trying to use those not sure why but the don’t seem to work right, iv’e been trying to set it up so that the player can right click to cause a hit-scan, if that scan hits something it calculates the relative position and moves the constraint to it before activating, but for some reason the constraint wont move and the player just spins in place, any idea’s?

So mine just gives an example of how to set it up the constraints, but if you want to spawn it in practice, don’t move a pre-existing constraint. You’ll want to use AddPhysicsConstraintComponent nodes to spawn constraints with similar settings, and then attach with SetConstrainedComponents. Destroy the constraint components on release.

okay, thanks

Okay so, I’ve gotten somewhere but i looked at your setup an I’m not sure how i would go about doing that. I can set a single physics constraint but I’m not sure how i would arrange the system like that, here’s a couple pictures of the code I’m working with.
a7d6beff12e2ead8c2fb79984da6b93f7850c31d.pngabdeccbebc2b5a3226919a4e4dff94a9b16fe025.png

Question:

Would the Grappling Hook Behavior of my GameJam Entry work for you?

If yes, I could share the idea behind it (not the actual code, since I’m still developing the game :D)

that could work but I’m just looking for a secondary system that allows the player to orbit an object, in essence I need a way to keep the player from moving x distance from a specified location, I just don’t know how to do that…

Here is something that can help: https://www.youtube.com/watch?v=DIPAiH9VP6M