Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Going down along a rope
#6
(12-12-2019, 09:19 AM)josemendez Wrote: Hi there!

Just chiming in (thanks DissidentDan for contributing! Sonrisa).

Implementing rope climbing depends on a lot of things, and can be done in multitude of ways (none of them trivial, btw). So it is a really broad and complex question.

- How your character movement is implemented? Does it use a rigidbody, controlled by forces/impulses, or is it semi-static? (moved by altering its transform directly).
- Do you want two-way coupling (the rope reacts to the character applying forces to it, and the character reacts to forces applied to the rope) or is it enough for the character to "follow" the rope without affecting it?
- How should the character attach to the rope? Should it grab it automatically based on distance, grab it based on user input, maybe a combination of both?
- Can the character climb up and down an existing rope, or is the rope "emitted" by the character (kinda like a grappling hook)?

The approach used to implement climbing differs greatly depending on the answer to these questions. Suppose that your character uses rigidbodies, that you want two-way coupling, and that the rope is pre-existing. In that case, you can use pin constraints (4.X) or dynamic attachments (5.X). You'd need to update the attachment dynamically every time the character moves up or down the rope.

If your character is not using a rigid body and you don't need two-way coupling, things get simpler. You can simply use rope.GetElementAt() to retrieve the structural element (ie, constraint) at any point in the rope -given as a normalized value in the (0,1) range-, and then set the character position to a point along that element.

In the third case that the rope is "emitted" by the character (like a grappling hook) Obi already includes a sample scene implementing this (aptly named "RopeGrapplingHook" Sonrisa)

Anyway, it's a difficult question to answer as it depends on a lot of details about how your character works and how to want the final behavior to be.

Hi,

Thanks a lot Jose.

The rope Should exist but could be visible or invisible, I ask a question for that in another post to know how it could be possible to implement a rope by a prefab and not a real time building of the rope....Anyway, it's another problem.

My character has a rigibody, but it will be desactivate during the falling in the rope. The character will appear on the top of the rope and fall according to a fixed speed. The character should have an effect on the rope but not necessarily in the other side (the rope on the character).

I think about using dynamic attach point but i know how to implement it in scene but not in real time, I don't know how to access these points and change them.

So thanks a lot if you can give me some solutions.
Reply


Messages In This Thread
Going down along a rope - by Pingosso - 10-12-2019, 03:31 PM
RE: Going down along a rope - by Dissident Dan - 11-12-2019, 03:50 PM
RE: Going down along a rope - by Pingosso - 11-12-2019, 04:05 PM
RE: Going down along a rope - by Dissident Dan - 11-12-2019, 07:47 PM
RE: Going down along a rope - by josemendez - 12-12-2019, 09:19 AM
RE: Going down along a rope - by Pingosso - 17-12-2019, 05:15 PM