Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HELP: Crane Scene Questions
#1
Hello and thank you in advance for any help! I am new to using obi rope in Unity and have a few questions. Attached is an image of what I'm trying to accomplish.

1. How do I create a similar rope to the crane scene?
  • This must be done at run time.
  • The rope needs to connect from the crane tip object to the load object (without changing the height of the load/pulling the object closer like the grapple rope does)
  • The rope will be a straight line in the y-direction
2. How do I control the length/max length of the rope?
  • In the crane scene the rope hits a stopping point where it cannot extend further. How do I specify that?
  • How do I make sure the rope distance between the load and crane tip is the same as the current distance between the objects before the rope is generated/instantiated
3. How do I control the stretching of a rope?
  • In the crane scene it grows without stretching, this is the behavior I want.
4. How is the load in the crane scene connected to the rope? Where is that specified.
Reply
#2
I will add details on how each item I accomplished was resolved:

1. How do I create a similar rope to the crane scene?
  • This must be done at run time. - resolved
  • The rope needs to connect from the crane tip object to the load object (without changing the height of the load/pulling the object closer like the grapple rope does) -resolved
  • The rope will be a straight line in the y-direction - resolved
2. How do I control the length/max length of the rope?
  • In the crane scene the rope hits a stopping point where it cannot extend further. How do I specify that? - resolved
  • How do I make sure the rope distance between the load and crane tip is the same as the current distance between the objects before the rope is generated/instantiated
3. How do I control the stretching of a rope?
  • In the crane scene it grows without stretching, this is the behavior I want. - resolved
4. How is the load in the crane scene connected to the rope? Where is that specified. - resolved
_____________________________________________________

Alright, so I did a on of learning over the past 24 hrs and read most documentation + watched the video. Here are the important questions remaining.

  1. How do I make sure the rope distance between the load and crane tip is the same as the current distance between the objects before the rope is generated/instantiated

The biggest issue here is establishing the rope length without any bouncing and twisting once I add the load to the rope. As seen in the attached image "crane3" I correctly get the rope length established, but I want the load to be absolutely still and in place with the rope taut . "crane 4" image shows the expected result.

My sudo code is like this:

Code:
//Init rope prefab
obiRope.GeneratePhysicRepresentationForMesh();
yield return null;
ObiRopeCursor cursor = obiRopeObj.GetComponent<ObiRopeCursor>();
float distance = Vector3.Distance(start, end);
cursor.ChangeLength(distance);

//Code to add load to the desired location on the rope
Reply