How to swing automatically a rope??

hello guys. i made a rope using rope editor but i couldn’t swing automatically. I mean a rope will shake left to right and right to left without a player. if you know this, can you share with me please i need it. thanks

like this:

Edit: The problem is solved. thanks to developer.

anybody help??

I’ve never used it. You could contact the dev or check youtube for tutorials. Otherwise try adding the player as a child of the rope when they grab it & unchild them when they release the rope

i couldn’t find this solution from all tutorials. it just telling swing with player i want to swing without player but i couldn’t do it

Sounds like you want a pendulum, have you tried adding a rigidbody with mass to the end of the rope?

In theory you should be able to do this with a hinge joint and a rigidbody.

i using 2d rope editor it has rigidbody and hinge joint already but mass is doesn’t work. should i write a script or can i do from another way?

You can see the rope example in the learning section if you only have a single joint and no friction or drag it should swing automatically.

http://unity3d.com/learn/tutorials/modules/beginner/2d/hingejoint2d?playlist=17120

Or you could just animate the swing using unity’s animation system, see the docs for details.

1 Like

in this tutorial he didn’t automatically. i said i using rope editor so it has joints and rigid body already in 2d rope editor. i’ll try animation but i don’t think so it does it. i found pendulum scripts but it doesn’t work again i don’t know what i do.

Are you wanting to use physics to swing it or a scripted movement? If you want it to swing constantly like in a platformer where the player has to time their jump onto it then you will need to script it. If you want it to swing like a real rope, only moving when pushed/pulled & slowing to a stop over time, then try using physics.

Have you tried emailing the dev for support? It’s hard for people to help if they don’t own the same product.

no. i didnt e-mail to dev support but how can they help me?? i tried a lot of script but nothing worked.

I suggested contacting the dev because if you bought a package then they should be able to help you modify their script or at least tell you the best way to do it. Without anyone else knowing exactly what scripts you are using it’s hard for people to make suggestions as we are just guessing.