Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
obi rope generating
#1
hi there..my character runs forward and each time it hits something a rope will be generated connecting from character to it and as you go forward the length should increase.
1- since level length is increasing is there going to be a decrease in performance since you may get multiple ropes and they're all getting longer?
2- when rope is generated for a moment it seems it's initial length is too much for a short distance between character and object, is there a way to shorten initial length of the rope?


Attached Files Thumbnail(s)
   
Reply
#2
(28-10-2021, 11:32 AM)Hoomann Wrote: hi there..my character runs forward and each time it hits something a rope will be generated connecting from character to it and as you go forward the length should increase.
1- since level length is increasing is there going to be a decrease in performance since you may get multiple ropes and they're all getting longer?
2- when rope is generated for a moment it seems it's initial length is too much for a short distance between character and object, is there a way to shorten initial length of the rope?

1- Yes: if rope length increases and the amount of ropes increases, the cost of simulation will increase too. There's no way around this, it's a basic consequence of how spatial discretization in physics works. The same will happen in any physics engine you use, not just Obi.

You'll have to come up with ways to reduce workload, custom-tailored to your game's use case: prune away ropes that have the least impact on results, shorten ropes that have become too long, etc.

2.- The initial length (aka, rest length) of he rope is determined by the blueprint you're using. You can change the blueprint length and shape at will in the blueprint editor.

At runtime, ropes might not be able to reach their rest length (or initial length) and droop/stretch a bit too much: solver settings may be a too conservative and as a consequence, the rope will stretch. Using more distance constraint iterations will improve quality, reducing spurious stretching. The manual contains an very in-depth explanation of how the solver works, and how iterations and substeps affect the results. See: http://obi.virtualmethodstudio.com/manua...gence.html
Reply
#3
(28-10-2021, 11:55 AM)josemendez Wrote: 1- Yes: if rope length increases and the amount of ropes increases, the cost of simulation will increase too. There's no way around this, it's a basic consequence of how spatial discretization in physics works. The same will happen in any physics engine you use, not just Obi.

You'll have to come up with ways to reduce workload, custom-tailored to your game's use case: prune away ropes that have the least impact on results, shorten ropes that have become too long, etc.

2.- The initial length (aka, rest length) of he rope is determined by the blueprint you're using. You can change the blueprint length and shape at will in the blueprint editor.

At runtime, ropes might not be able to reach their rest length (or initial length) and droop/stretch a bit too much: solver settings may be a too conservative and as a consequence, the rope will stretch. Using more distance constraint iterations will improve quality, reducing spurious stretching. The manual contains an very in-depth explanation of how the solver works, and how iterations and substeps affect the results. See: http://obi.virtualmethodstudio.com/manua...gence.html
1- how about when each rope reaches a specific length it starts decreasing from the other end with the speed its increasing from character. is it possible? does it do the job?
Reply
#4
(28-10-2021, 12:33 PM)Hoomann Wrote: 1- how about when each rope reaches a specific length it starts decreasing from the other end with the speed its increasing from character. is it possible? does it do the job?

Yes it's possible: just have two cursors, one adds rope while the other removes it from the other end. But whether or not it solves the problem depends a lot on the specifics of your use case. For instance, if your rope needs to be attached to the character at one end and to some fixed object at the other end, this obviously won't work: there needs to be rope between the full distance between the object and the character, you can't shorten it as it would detach.
Reply
#5
(28-10-2021, 12:40 PM)josemendez Wrote: Yes it's possible: just have two cursors, one adds rope while the other removes it from the other end. But whether or not it solves the problem depends a lot on the specifics of your use case. For instance, if your rope needs to be attached to the character at one end and to some fixed object at the other end, this obviously won't work: there needs to be rope between the full distance between the object and the character, you can't shorten it as it would detach.
yes that's the case...it's attached to an object at both ends all the time
i guess i have to make some changes to the game itself then.
thanks anyway for your time
Reply