Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Swinging on rope
#1
Pregunta 
Hello, I need your explanation of all ways to attach my player to a rope so that he is attached to the rope as tightly as possible and stays on it without small jumps and etc. Also, for my situation, it is important that the player can calmly swing on the rope an physically act on it. At the same time, the rope should be not too tight and too soft, something between.
Reply
#2
(26-05-2025, 05:24 PM)quent_1982 Wrote: Hello, I need your explanation of all ways to attach my player to a rope so that he is attached to the rope as tightly as possible and stays on it without small jumps and etc.

Hi!

If you want the player to climb up/down the rope, a pinhole is the best option. You can use the "VineSwinging" sample scene as reference.

If you merely want the player to swing from the end of the rope, a dynamic ObiParticleAttachment will suffice. See the "RopeGrapplingHook" scene for a complete example.


(26-05-2025, 05:24 PM)quent_1982 Wrote: Also, for my situation, it is important that the player can calmly swing on the rope an physically act on it.

Both of the above scenes contains a sample physics-driven character controller that allows two-way interaction between the character and the rope.

(26-05-2025, 05:24 PM)quent_1982 Wrote: At the same time, the rope should be not too tight and too soft, something between.

You can control both the bending and stretching elasticity of the rope using its stretch/bend compliance parameters.

kind regards,
Reply
#3
(26-05-2025, 07:41 PM)josemendez Wrote: Hi!

If you want the player to climb up/down the rope, a pinhole is the best option. You can use the "VineSwinging" sample scene as reference.

If you merely want the player to swing from the end of the rope, a dynamic ObiParticleAttachment will suffice. See the "RopeGrapplingHook" scene for a complete example.



Both of the above scenes contains a sample physics-driven character controller that allows two-way interaction between the character and the rope.


You can control both the bending and stretching elasticity of the rope using its stretch/bend compliance parameters.

kind regards,

Thanks for reply, but I need to dynamically attach my player to almost every part of the rope and all of Obi Examples does not seem too much helpful for my case. I've tried ObiParticleAttachment and it is too jumpy and does not look good.
Reply
#4
(27-05-2025, 08:34 AM)quent_1982 Wrote: Thanks for reply, but I need to dynamically attach my player to almost every part of the rope and all of Obi Examples does not seem too much helpful for my case.

Both of the sample scenes I mentioned attach the player dynamically (that is, at runtime without any pre-existing attachments created in-editor). In particular, the VineSwinging example dynamically attaches the player to *any* part of the rope. You can take a look at the source code for both:

- Obi/Samples/RopeAndRod/SampleResources/Scripts/ExtendableGrapplingHook.cs
- Obi/Samples/RopeAndRod/SampleResources/Scripts/VineClimbController.cs

(27-05-2025, 08:34 AM)quent_1982 Wrote: I've tried ObiParticleAttachment and it is too jumpy and have completely not good looking.

Make sure the character is not colliding against the rope when attached to it. This will lead to jittery/jumpy attachments as explained in the manual (since it is not physically possible for the rope to be simultaneously attached inside a collider and be outside the collider):
https://obi.virtualmethodstudio.com/manu...ments.html

kind regards
Reply
#5
(27-05-2025, 08:39 AM)josemendez Wrote: Both of the sample scenes I mentioned attach the player dynamically (that is, at runtime without any pre-existing attachments created in-editor). In particular, the VineSwinging example dynamically attaches the player to *any* part of the rope. You can take a look at the source code for both:

- Obi/Samples/RopeAndRod/SampleResources/Scripts/ExtendableGrapplingHook.cs
- Obi/Samples/RopeAndRod/SampleResources/Scripts/VineClimbController.cs


Make sure the character is not colliding against the rope when attached to it. This will lead to jittery/jumpy attachments as explained in the manual (since it is not physically possible for the rope to be simultaneously attached inside a collider and be outside the collider):
https://obi.virtualmethodstudio.com/manu...ments.html

kind regards

I'll check, thanks again!
Reply