Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Rope without bending and stretching
#1
Hey guys, I'm making grapple gun system for my game, and I need a rope without bending and stretching, can I achieve somehow that result?
I already tested changing distance/bending iterations up to 50 on obi solve, and tested changing bend constraints in obi rope also setting to 0.01.
I'm completely newbie in Obi system, so maybe that's easy question.
Reply
#2
(03-06-2020, 03:04 PM)davidsedrakyan Wrote: Hey guys, I'm making grapple gun system for my game, and I need a rope without bending and stretching, can I achieve somehow that result?
I already tested changing distance/bending iterations up to 50 on obi solve, and tested changing bend constraints in obi rope also setting to 0.01.
I'm completely newbie in Obi system, so maybe that's easy question.

A rope that doesn't bend or stretch is essentially a stick, so I doubt you really want that. Guiño If you do, then use a regular rigidbody. No physics engine can yield 100% rigid constraints, unless you use specialized algorithms (such as featherstone's articulated bodies) for that.

Increasing the amount of substeps is better at improving convergence than increasing the amount of iterations. If you haven't already, take a look at this manual page for an in-depth explanation of how the simulation works, and how substeps/iterations affect the result: http://obi.virtualmethodstudio.com/tutor...gence.html

cheers,
Reply
#3
(03-06-2020, 03:18 PM)josemendez Wrote: A rope that doesn't bend or stretch is essentially a stick, so I doubt you really want that. Guiño If you do, then use a regular rigidbody. No physics engine can yield 100% rigid constraints, unless you use specialized algorithms (such as featherstone's articulated bodies) for that.

Increasing the amount of substeps is better at improving convergence than increasing the amount of iterations. If you haven't already, take a look at this manual page for an in-depth explanation of how the simulation works, and how substeps/iterations affect the result: http://obi.virtualmethodstudio.com/tutor...gence.html

cheers,

Thanks for the fast answer, one more question, I have a humanoid-characterr, hanging from the rope, and I need to rotate character, according to rope rotation, can I get generated rope point rotation?
Reply
#4
(03-06-2020, 04:06 PM)davidsedrakyan Wrote: Thanks for the fast answer, one more question, I have a humanoid-characterr, hanging from the rope, and I need to rotate character, according to rope rotation, can I get generated rope point rotation?

What do you mean by rope "rotation"? A deformable object does not have a single rotation value, each point in the rope has its own...

I assume you want to place the character at a certain point along the rope. In that case, this thread might be helpful:
http://obi.virtualmethodstudio.com/forum...ht=section
Reply
#5
(03-06-2020, 04:09 PM)josemendez Wrote: What do you mean by rope "rotation"? A deformable object does not have a single rotation value, each point in the rope has its own...

I assume you want to place the character at a certain point along the rope. In that case, this thread might be helpful:
http://obi.virtualmethodstudio.com/forum...ht=section

Yeah, there is 2 points on my rope, I need rotation of point which is connected with my character Sonrisa

(03-06-2020, 04:09 PM)josemendez Wrote: What do you mean by rope "rotation"? A deformable object does not have a single rotation value, each point in the rope has its own...

I assume you want to place the character at a certain point along the rope. In that case, this thread might be helpful:
http://obi.virtualmethodstudio.com/forum...ht=section

There is example on Obi Rope Plugin, where character hangs with rome, called Rope Grappling Hook, but in that example character is not rotating when rope end rotates.

(03-06-2020, 04:09 PM)josemendez Wrote: What do you mean by rope "rotation"? A deformable object does not have a single rotation value, each point in the rope has its own...

I assume you want to place the character at a certain point along the rope. In that case, this thread might be helpful:
http://obi.virtualmethodstudio.com/forum...ht=section


Attached Files Thumbnail(s)
   
Reply
#6
(03-06-2020, 04:12 PM)davidsedrakyan Wrote: Yeah, there is 2 points on my rope, I need rotation of point which is connected with my character Sonrisa


There is example on Obi Rope Plugin, where character hangs with rome, called Rope Grappling Hook, but in that example character is not rotating when rope end rotates.


There's two control points in the rope spline, but the actual rope is made of many more points. It would just be a straight line otherwise, since that's the only shape defined by just two points. You can add a ObiParticleRenderer component to it to actually see all "points" (particles) that make up the rope.
The method outlined in the above link takes a normalized coordinate as input: 0 for one end of the rope, 1 for the opposite end, any value in-between for all other points in the rope.
Reply
#7
(03-06-2020, 04:38 PM)josemendez Wrote: There's two control points in the rope, but the actual rope is made of many more points. It would just be a straight line otherwise, since that's the only shape defined by just two points.
The method outlined in the above link takes a normalized coordinate as input: 0 for one end of the rope, 1 for the opposite end, any value in-between for all other points in the rope.

Yes, you are completely right, so I need to pass 0 or 1 for each point of rope, and I will get ObiPathFrame struct, from what i can get rotation of the point?
Reply
#8
(03-06-2020, 04:43 PM)davidsedrakyan Wrote: Yes, you are completely right, so I need to pass 0 or 1 for each point of rope, and I will get ObiPathFrame struct, from what i can get rotation of the point?

The struct contains a full orthonormal frame (tangent, bitangent and normal, the tangent vector points along the rope curve). You can easily get a quaternion from that. See:
https://docs.unity3d.com/ScriptReference...ation.html

Keep in mind that ropes do not model torsion, so twist along the tangent axis is largely undefined. You might want to use your character's forward vector instead of the frame's normal vector to get consistent orientation.
Reply
#9
(03-06-2020, 04:45 PM)josemendez Wrote: The struct contains a full orthonormal frame (tangent, bitangent and normal, the tangent vector points along the rope curve). You can easily get a quaternion from that. See:
https://docs.unity3d.com/ScriptReference...ation.html

Keep in mind that ropes do not model torsion, so twist along the tangent axis is largely undefined. You might want to use your character's forward vector instead of the frame's normal vector to get consistent orientation.

Thank you, will check it out!
Reply