We will be out of office from December 23th to January 7th. During this time we'll check the forums less often, we'll be back at full throttle soon. Take care, Merry Christmas!
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.
03-06-2020, 03:18 PM (This post was last modified: 03-06-2020, 03:19 PM by josemendez.)
(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. 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
(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. 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?
03-06-2020, 04:09 PM (This post was last modified: 03-06-2020, 04:12 PM by josemendez.)
(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...
03-06-2020, 04:12 PM (This post was last modified: 03-06-2020, 04:18 PM by davidsedrakyan.)
(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...
Yeah, there is 2 points on my rope, I need rotation of point which is connected with my character
(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...
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...
03-06-2020, 04:38 PM (This post was last modified: 03-06-2020, 04:42 PM by josemendez.)
(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
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.
(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?
03-06-2020, 04:45 PM (This post was last modified: 03-06-2020, 04:50 PM by josemendez.)
(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.
(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.