Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Going down along a rope
#1
Hi Jose, Hi the community,

I'm doing a rope project with a rope attach to a branch for example with somebody who going down along the rope....but I have no idea how to make the person on the rope going down and the rope follows his foots and hands....the person should going down linearly and doesn't follow the rope, but he can't be the child of the rope?

If somebody could help me?

Thanks a lot and very good job Jose....the rope behavior is very realistic.
Reply
#2
Someone with more experience might better be able to answer, but I would try making the player and/or his hands and feet a rigid body with an ObiRigidBody component, and then using pin constraints. You would update those constraints (which particles to pin the rigid bodies to and the relative offsets) as the player moves down the rope.
Reply
#3
(11-12-2019, 03:50 PM)Dissident Dan Wrote: Someone with more experience might better be able to answer, but I would try making the player and/or his hands and feet a rigid body with an ObiRigidBody component, and then using pin constraints. You would update those constraints (which particles to pin the rigid bodies to and the relative offsets) as the player moves down the rope.

Thanks Dan for your response. I see you could use pin constraints in the solver but I don't know how it works, the only examples I've seen, were with previous ObiRope version and I don't know how to deal with pin constraints with the 5.0 version. I will check.

Nevertheless, if you put an active rigibody, your player will fall down with gravity and you can't control his descent, no?

I saw another probem with my rope, it's that when the branch where the rope is attached has a pitch angle, so the rope has an angle and follow this angle when it touches the ground, how can i fixed it?

Thanks again a lot
Reply
#4
(11-12-2019, 04:05 PM)Pingosso Wrote: Thanks Dan for your response. I see you could use pin constraints in the solver but I don't know how it works, the only examples I've seen, were with previous ObiRope version and I don't know how to deal with pin constraints with the 5.0 version. I will check.

Nevertheless, if you put an active rigibody, your player will fall down with gravity and you can't control his descent, no?

I saw another probem with my rope, it's that when the branch where the rope is attached has a pitch angle, so the rope has an angle and follow this angle when it touches the ground, how can i fixed it?

Thanks again a lot

For pin constraints, check this out: http://obi.virtualmethodstudio.com/tutor...ments.html

If the player has an ObiRigidBody component and does NOT have "is kinematic for particles" checked, then it should be able to be supported by a rope that is attached to something at the other end. I haven't experimented heavily with this enough to say anything conclusion, though.

For the angle problem, there are probably several solutions. Possible solutions:

1) Make sure the rope attachment has a counteracting rotation.
2) An easy one might be to have a sub-object of the branch that is oriented upright and then attach the rope to that.
Reply
#5
(11-12-2019, 04:05 PM)Pingosso Wrote: Thanks Dan for your response. I see you could use pin constraints in the solver but I don't know how it works, the only examples I've seen, were with previous ObiRope version and I don't know how to deal with pin constraints with the 5.0 version. I will check.

Nevertheless, if you put an active rigibody, your player will fall down with gravity and you can't control his descent, no?

I saw another probem with my rope, it's that when the branch where the rope is attached has a pitch angle, so the rope has an angle and follow this angle when it touches the ground, how can i fixed it?

Thanks again a lot


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.
Reply
#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