- Home /
Other
how to swing character controller on rope? I want the movement exactly like manuganu 2.
I am trying to swing my player on rope and rope movement is animated too and fro motion. I have used hingjoint but it is not working perfectly what i need like manuganu 2. I have also parent it on collision but still not getting that effect.
For ropes in Unity, in practice you need to just use one of the excellent rope kits available on the asset store.
It could easily take you 1-2 man-years to properly program ropes from scratch. There's no realistic alternative these days ... it's one of those things you realistically just have to use one of the available solutions.
Enjoy!
thanks for your answer, but please check the rope swing in manuganu 2 then you can get what i want to do. Check the given image.
Fattie is absolutely correct. You should check rope kit available in asset store .It could take years for scripting them from scratch . @rajan4uto .Theres no chance of building a realistic rope using animation to use in physics.
Answer by _Yash_ · Dec 31, 2015 at 06:02 AM
Create a vertical strip of vertices as a rope, you can also create cylinder but 2D will be fine for this.
It's anchor should be at the top for ease of calculation.
now use MeshFilter of the object to access the vertex array of this strip in Unity.
animate each vertex horizontally based on distance from the top. Now rope will be moving straight(similar to left rope in image).
to give it a curve (similar to right rope in image), use exponential distance from top, or use some power of distance from top.
If you just want to show this ropes, you can do this in Shader. if you need to access the state/position of rope to hang something, you should do as above.
thanks! i am going to try this and if it will work i will share the script.