Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Setting the length of rope during run time instantly (not gradually growing it)
#1
Is this possible? I'd like to, for example, have a rope that is 3 meters long, then make it instantly 20 meters long. Rather than gradually extending it.
Reply
#2
(31-01-2024, 03:10 PM)Mulbin Wrote: Is this possible? I'd like to, for example, have a rope that is 3 meters long, then make it instantly 20 meters long. Rather than gradually extending it.

Hi!

Yes, using a ObiRopeCursor component this is the default behavior. For instance: to set the length to 20 meters, just add a cursor to the rope and call cursor.ChangeLength(20).

It will only change gradually if instead of setting a fixed length you add to its length over time, see the "Crane" sample scene for an example of this.

Note that your blueprint must have enough pooled particles to reach the length you set (see: http://obi.virtualmethodstudio.com/manua...setup.html). Also note that the newly added particles will be in the same place as the target one, so if you need to place them in any specific position you must do so manually. You have another example of this in the "GrapplingHook" sample scene.

kind regards,
Reply
#3
Great thanks, I'll look into that. I'm making an extendible hose which needs to get longer as you pull one end away (a bit like the power cord on a vacuum cleaner)... but I also don't want it taught, it should flop to the ground... so planning to get the distance from the root to the "plug" and always keep it a little longer than that so there is some slack.
Reply