How could I go about coding a rope which can properly wrap around object?

Godot Version



Effectivly I’m trying to code a wire that wraps around objects, in 3D…
I’ve been trying to find resources for this but I am unable.

It would begin as a two point wire.
Then when a box intersects with it, new points would be made (represented by the newly added blue dots with green X’s on them)
Currently I have access to all the red data (the collison hit pos, what we hit and the normal of it) and I need to figure out how to use that data to be able to calculate the green dots.

One idea I have on how to do this is by somehow slicing the collison of the box into a slice then getting the corners or something but I dont know how to go about implementing something like that.

Help would be highly appriciated!

1 Like

According to this talk from Godot Conference 2023 this mechanic can be surprisingly more complex that it seems at the first glance:

Give it a look, and may be you will find some useful ideas for the 3D implementation.

1 Like

This is quite helpfull! I managed to also find that collison shapes can be made into meshes, with these two things I should be able to get something working. I’ll be back with the solution…